]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR libstdc++/3034 (DR 214)
authorPhil Edwards <pme@gcc.gnu.org>
Mon, 4 Jun 2001 17:50:18 +0000 (17:50 +0000)
committerPhil Edwards <pme@gcc.gnu.org>
Mon, 4 Jun 2001 17:50:18 +0000 (17:50 +0000)
2001-06-04  Phil Edwards  <pme@sources.redhat.com>

PR libstdc++/3034
* include/bits/stl_multiset.h (find, lower_bound, upper_bound,
equal_range):  Add const overloads as per LWG DR 214.
* include/bits/stl_set.h:  Likewise.

From-SVN: r42862

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/stl_multiset.h
libstdc++-v3/include/bits/stl_set.h

index 361884c56ebd9b3b95716d85865d08c4ef760e7c..8203b2e08cd7f6428d51542a6a367af2123f712d 100644 (file)
@@ -1,6 +1,14 @@
+2001-06-04  Phil Edwards  <pme@sources.redhat.com>
+
+       PR libstdc++/3034
+       * include/bits/stl_multiset.h (find, lower_bound, upper_bound,
+       equal_range):  Add const overloads as per LWG DR 214.
+       * include/bits/stl_set.h:  Likewise.
+
 2001-06-04  Brendan Kehoe  <brendan@zen.org>
             Phil Edwards  <pme@sources.redhat.com>
 
+       PR libstdc++/3018
        * include/bits/std_bitset.h (bitset::test):  Fix __pos >= _Nb
        comparison; all positions must be < _Nb.
        * testsuite/23_containers/bitset_members.cc:  New file.
index bb4e5a98108eff05928b2465a259f95486d1ba8d..2d16985f95636edffa29bde549fc7a888ef97dc4 100644 (file)
@@ -151,8 +151,32 @@ public:
 
   // multiset operations:
 
-  iterator find(const key_type& __x) const { return _M_t.find(__x); }
   size_type count(const key_type& __x) const { return _M_t.count(__x); }
+
+#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
+//214.  set::find() missing const overload
+  iterator find(const key_type& __x) { return _M_t.find(__x); }
+  const_iterator find(const key_type& __x) const { return _M_t.find(__x); }
+  iterator lower_bound(const key_type& __x) {
+    return _M_t.lower_bound(__x);
+  }
+  const_iterator lower_bound(const key_type& __x) const {
+    return _M_t.lower_bound(__x);
+  }
+  iterator upper_bound(const key_type& __x) {
+    return _M_t.upper_bound(__x);
+  }
+  const_iterator upper_bound(const key_type& __x) const {
+    return _M_t.upper_bound(__x);
+  }
+  pair<iterator,iterator> equal_range(const key_type& __x) {
+    return _M_t.equal_range(__x);
+  }
+  pair<const_iterator,const_iterator> equal_range(const key_type& __x) const {
+    return _M_t.equal_range(__x);
+  }
+#else
+  iterator find(const key_type& __x) const { return _M_t.find(__x); }
   iterator lower_bound(const key_type& __x) const {
     return _M_t.lower_bound(__x);
   }
@@ -162,6 +186,7 @@ public:
   pair<iterator,iterator> equal_range(const key_type& __x) const {
     return _M_t.equal_range(__x);
   }
+#endif
 
   template <class _K1, class _C1, class _A1>
   friend bool operator== (const multiset<_K1,_C1,_A1>&,
index 3cfffb4b9d03a5e3ab608d32dfc2db950480a73a..13dca9f324ba9a9730805748d0280c0bb12666ec 100644 (file)
@@ -148,10 +148,34 @@ public:
 
   // set operations:
 
-  iterator find(const key_type& __x) const { return _M_t.find(__x); }
   size_type count(const key_type& __x) const {
     return _M_t.find(__x) == _M_t.end() ? 0 : 1;
   }
+
+#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
+//214.  set::find() missing const overload
+  iterator find(const key_type& __x) { return _M_t.find(__x); }
+  const_iterator find(const key_type& __x) const { return _M_t.find(__x); }
+  iterator lower_bound(const key_type& __x) {
+    return _M_t.lower_bound(__x);
+  }
+  const_iterator lower_bound(const key_type& __x) const {
+    return _M_t.lower_bound(__x);
+  }
+  iterator upper_bound(const key_type& __x) {
+    return _M_t.upper_bound(__x); 
+  }
+  const_iterator upper_bound(const key_type& __x) const {
+    return _M_t.upper_bound(__x); 
+  }
+  pair<iterator,iterator> equal_range(const key_type& __x) {
+    return _M_t.equal_range(__x);
+  }
+  pair<const_iterator,const_iterator> equal_range(const key_type& __x) const {
+    return _M_t.equal_range(__x);
+  }
+#else
+  iterator find(const key_type& __x) const { return _M_t.find(__x); }
   iterator lower_bound(const key_type& __x) const {
     return _M_t.lower_bound(__x);
   }
@@ -161,6 +185,7 @@ public:
   pair<iterator,iterator> equal_range(const key_type& __x) const {
     return _M_t.equal_range(__x);
   }
+#endif
 
   template <class _K1, class _C1, class _A1>
   friend bool operator== (const set<_K1,_C1,_A1>&, const set<_K1,_C1,_A1>&);