* 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

+12 -3
View File
@@ -580,11 +580,20 @@ int set_test ()
//Compare count with std containers
for(int i = 0; i < MaxElem; ++i){
IntType count_me(i);
if(boostset.count(count_me) != stdset.count(i)){
IntType k(i);
if(boostset.count(k) != stdset.count(i)){
return -1;
}
if(boostmultiset.count(count_me) != stdmultiset.count(i)){
if(boostset.contains(k) != (stdset.find(i) != stdset.end())){
return -1;
}
if(boostmultiset.count(k) != stdmultiset.count(i)){
return -1;
}
if(boostmultiset.contains(k) != (stdmultiset.find(i) != stdmultiset.end())){
return -1;
}
}