mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-06 19:38:41 +03:00
add missing members to stl allocator (#193)
This commit is contained in:
parent
b77be05e40
commit
146899af8a
3 changed files with 56 additions and 19 deletions
|
@ -202,7 +202,7 @@ bool test_heap2() {
|
|||
|
||||
bool test_stl_allocator1() {
|
||||
#ifdef __cplusplus
|
||||
std::vector<int, mi_stl_allocator<int>> vec;
|
||||
std::vector<int, mi_stl_allocator<int> > vec;
|
||||
vec.push_back(1);
|
||||
vec.pop_back();
|
||||
return vec.size() == 0;
|
||||
|
@ -211,11 +211,11 @@ bool test_stl_allocator1() {
|
|||
#endif
|
||||
}
|
||||
|
||||
struct some_struct { int i; int j; double z; };
|
||||
|
||||
bool test_stl_allocator2() {
|
||||
#ifdef __cplusplus
|
||||
struct some_struct { int i; int j; double z; };
|
||||
|
||||
std::vector<some_struct, mi_stl_allocator<some_struct>> vec;
|
||||
std::vector<some_struct, mi_stl_allocator<some_struct> > vec;
|
||||
vec.push_back(some_struct());
|
||||
vec.pop_back();
|
||||
return vec.size() == 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue