Fix issue #134 - compilation error in C++20 mode

This commit is contained in:
greg7mdp
2022-03-09 09:50:24 -05:00
parent 73be7c2ab2
commit d13c5f41b5
2 changed files with 9 additions and 3 deletions
+6
View File
@@ -1528,6 +1528,12 @@ namespace priv {
bool operator!=(const const_iterator &x) const { bool operator!=(const const_iterator &x) const {
return node != x.node || position != x.position; return node != x.node || position != x.position;
} }
bool operator==(const iterator &x) const {
return node == x.node && position == x.position;
}
bool operator!=(const iterator &x) const {
return node != x.node || position != x.position;
}
// Accessors for the key/value the iterator is pointing at. // Accessors for the key/value the iterator is pointing at.
reference operator*() const { reference operator*() const {
+1 -1
View File
@@ -120,7 +120,7 @@ TEST(THIS_TEST_NAME, EmplaceSingle) {
// -------------------- // --------------------
// test emplace_single // test emplace_single
// -------------------- // --------------------
Set m = { {1}, {11} }; Set m = { 1, 11 };
// emplace_single insert a value if not already present, else removes it // emplace_single insert a value if not already present, else removes it
for (int i=0; i<12; ++i) for (int i=0; i<12; ++i)