* Implemented C++20 contains() for associative containers as specified in P0458R2.

* Fixed serious bug in heterogeneous lookup functions (is_transparent was broken).
This commit is contained in:
Ion Gaztañaga committed 2018-08-13 15:36:00 +02:00
1 parent 1ad64316a4
commit 139db663a3
16 files changed
+220 -16

No files matched your search

+9 -1
View File
@@ -628,16 +628,24 @@ int map_test()
}
}
//Compare count with std containers
//Compare count/contains with std containers
for(int i = 0; i < MaxElem; ++i){
IntType k(i);
if(boostmap.count(k) != stdmap.count(i)){
return -1;
}
if(boostmap.contains(k) != (stdmap.find(i) != stdmap.end())){
return -1;
}
if(boostmultimap.count(k) != stdmultimap.count(i)){
return -1;
}
if(boostmultimap.contains(k) != (stdmultimap.find(i) != stdmultimap.end())){
return -1;
}
}
//Now do count exercise