This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[v3] Add cbegin, cend & co to the containers (in C++0x mode)


Hi,

tested x86_64-linux, committed to mainline.

Paolo.

///////////////////
2007-10-15  Paolo Carlini  <pcarlini@suse.de>

	* include/debug/set.h (set<>::cbegin, cend, crbegin, crend): Add.
	* include/debug/multiset.h (set<>::cbegin, cend, crbegin, crend):
	Likewise.
	* include/debug/vector (vector<>::cbegin, cend, crbegin, crend):
	Likewise.
	* include/debug/map.h (map<>::cbegin, cend, crbegin, crend):
	Likewise.
	* include/debug/deque (deque<>::cbegin, cend, crbegin, crend): 
	Likewise.
	* include/debug/list (list<>::cbegin, cend, crbegin, crend):
	Likewise.
	* include/debug/multimap.h (multimap<>::cbegin, cend, crbegin,
	crend): Likewise.
	* include/tr1_impl/array (array<>::cbegin, cend, crbegin, crend):
	Likewise.
	* include/ext/vstring.h (__versa_string<>::cbegin, cend, crbegin,
	crend): Likewise.
	* include/bits/stl_list.h (list<>::cbegin, cend, crbegin, crend):
	Likewise.
	* include/bits/stl_map.h (map<>::cbegin, cend, crbegin, crend):
	Likewise.
	* include/bits/stl_set.h (set<>::cbegin, cend, crbegin, crend):
	Likewise.
	* include/bits/stl_multimap.h (multimap<>::cbegin, cend, crbegin,
	crend): Likewise.
	* include/bits/stl_vector.h (vector<>::cbegin, cend, crbegin, crend):
	Likewise.
	* include/bits/stl_deque.h (deque<>::cbegin, cend, crbegin, crend):
	Likewise.
	* include/bits/stl_multiset.h (multiset<>::cbegin, cend, crbegin,
	crend): Likewise.
	* include/bits/stl_bvector.h (vector<bool>::cbegin, cend, crbegin,
	crend): Likewise.
	* include/tr1_impl/hashtable (_Hashtable<>::cbegin, cend): Add.	

	* testsuite/ext/vstring/requirements/citerators.cc: Add.
	* testsuite/23_containers/unordered_map/requirements/citerators.cc:
	Likewise.
	* testsuite/23_containers/multimap/requirements/citerators.cc:
	Likewise.
	* testsuite/23_containers/set/requirements/citerators.cc: Likewise.
	* testsuite/23_containers/unordered_multimap/requirements/
	citerators.cc: Likewise.
	* testsuite/23_containers/unordered_set/requirements/citerators.cc:
	Likewise.
	* testsuite/23_containers/vector/requirements/citerators.cc: Likewise.
	* testsuite/23_containers/vector/bool/requirements/citerators.cc:
	Likewise.
	* testsuite/23_containers/deque/requirements/citerators.cc: Likewise.
	* testsuite/23_containers/multiset/requirements/citerators.cc:
	Likewise.
	* testsuite/23_containers/list/requirements/citerators.cc: Likewise.
	* testsuite/23_containers/unordered_multiset/requirements/
	citerators.cc: Likewise.
	* testsuite/23_containers/map/requirements/citerators.cc: Likewise.
	* testsuite/23_containers/array/requirements/citerators.cc: Likewise.

	* testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
	Adjust dg-error lines.
	* testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
	Likewise.
	* testsuite/23_containers/vector/requirements/dr438/
	constructor_1_neg.cc: Likewise.
	* testsuite/23_containers/vector/requirements/dr438/
	constructor_2_neg.cc: Likewise.
	* testsuite/23_containers/deque/requirements/dr438/assign_neg.cc:
	Likewise.
	* testsuite/23_containers/deque/requirements/dr438/insert_neg.cc:
	Likewise.
	* testsuite/23_containers/deque/requirements/dr438/
	constructor_1_neg.cc: Likewise.
	* testsuite/23_containers/deque/requirements/dr438/
	constructor_2_neg.cc: Likewise.
	* testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
	Likewise.
	* testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
	Likewise.
	* testsuite/23_containers/list/requirements/dr438/
	constructor_1_neg.cc: Likewise.
	* testsuite/23_containers/list/requirements/dr438/
	constructor_2_neg.cc: Likewise.
Index: include/debug/set.h
===================================================================
--- include/debug/set.h	(revision 129314)
+++ include/debug/set.h	(working copy)
@@ -152,6 +152,24 @@
       rend() const
       { return const_reverse_iterator(begin()); }
 
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      const_iterator
+      cbegin() const
+      { return const_iterator(_Base::begin(), this); }
+
+      const_iterator
+      cend() const
+      { return const_iterator(_Base::end(), this); }
+
+      const_reverse_iterator
+      crbegin() const
+      { return const_reverse_iterator(end()); }
+
+      const_reverse_iterator
+      crend() const
+      { return const_reverse_iterator(begin()); }
+#endif
+
       // capacity:
       using _Base::empty;
       using _Base::size;
Index: include/debug/multiset.h
===================================================================
--- include/debug/multiset.h	(revision 129314)
+++ include/debug/multiset.h	(working copy)
@@ -152,6 +152,24 @@
       rend() const
       { return const_reverse_iterator(begin()); }
 
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      const_iterator
+      cbegin() const
+      { return const_iterator(_Base::begin(), this); }
+
+      const_iterator
+      cend() const
+      { return const_iterator(_Base::end(), this); }
+
+      const_reverse_iterator
+      crbegin() const
+      { return const_reverse_iterator(end()); }
+
+      const_reverse_iterator
+      crend() const
+      { return const_reverse_iterator(begin()); }
+#endif
+
       // capacity:
       using _Base::empty;
       using _Base::size;
Index: include/debug/vector
===================================================================
--- include/debug/vector	(revision 129314)
+++ include/debug/vector	(working copy)
@@ -181,6 +181,24 @@
       rend() const
       { return const_reverse_iterator(begin()); }
 
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      const_iterator
+      cbegin() const
+      { return const_iterator(_Base::begin(), this); }
+
+      const_iterator
+      cend() const
+      { return const_iterator(_Base::end(), this); }
+
+      const_reverse_iterator
+      crbegin() const
+      { return const_reverse_iterator(end()); }
+
+      const_reverse_iterator
+      crend() const
+      { return const_reverse_iterator(begin()); }
+#endif
+
       // 23.2.4.2 capacity:
       using _Base::size;
       using _Base::max_size;
Index: include/debug/map.h
===================================================================
--- include/debug/map.h	(revision 129314)
+++ include/debug/map.h	(working copy)
@@ -156,6 +156,24 @@
       rend() const
       { return const_reverse_iterator(begin()); }
 
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      const_iterator
+      cbegin() const
+      { return const_iterator(_Base::begin(), this); }
+
+      const_iterator
+      cend() const
+      { return const_iterator(_Base::end(), this); }
+
+      const_reverse_iterator
+      crbegin() const
+      { return const_reverse_iterator(end()); }
+
+      const_reverse_iterator
+      crend() const
+      { return const_reverse_iterator(begin()); }
+#endif
+
       // capacity:
       using _Base::empty;
       using _Base::size;
Index: include/debug/deque
===================================================================
--- include/debug/deque	(revision 129314)
+++ include/debug/deque	(working copy)
@@ -166,6 +166,24 @@
       rend() const
       { return const_reverse_iterator(begin()); }
 
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      const_iterator
+      cbegin() const
+      { return const_iterator(_Base::begin(), this); }
+
+      const_iterator
+      cend() const
+      { return const_iterator(_Base::end(), this); }
+
+      const_reverse_iterator
+      crbegin() const
+      { return const_reverse_iterator(end()); }
+
+      const_reverse_iterator
+      crend() const
+      { return const_reverse_iterator(begin()); }
+#endif
+
       // 23.2.1.2 capacity:
       using _Base::size;
       using _Base::max_size;
Index: include/debug/list
===================================================================
--- include/debug/list	(revision 129314)
+++ include/debug/list	(working copy)
@@ -195,6 +195,24 @@
       rend() const
       { return const_reverse_iterator(begin()); }
 
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      const_iterator
+      cbegin() const
+      { return const_iterator(_Base::begin(), this); }
+
+      const_iterator
+      cend() const
+      { return const_iterator(_Base::end(), this); }
+
+      const_reverse_iterator
+      crbegin() const
+      { return const_reverse_iterator(end()); }
+
+      const_reverse_iterator
+      crend() const
+      { return const_reverse_iterator(begin()); }
+#endif
+
       // 23.2.2.2 capacity:
       using _Base::empty;
       using _Base::size;
Index: include/debug/multimap.h
===================================================================
--- include/debug/multimap.h	(revision 129314)
+++ include/debug/multimap.h	(working copy)
@@ -155,6 +155,24 @@
       rend() const
       { return const_reverse_iterator(begin()); }
 
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      const_iterator
+      cbegin() const
+      { return const_iterator(_Base::begin(), this); }
+
+      const_iterator
+      cend() const
+      { return const_iterator(_Base::end(), this); }
+
+      const_reverse_iterator
+      crbegin() const
+      { return const_reverse_iterator(end()); }
+
+      const_reverse_iterator
+      crend() const
+      { return const_reverse_iterator(begin()); }
+#endif
+
       // capacity:
       using _Base::empty;
       using _Base::size;
Index: include/tr1_impl/hashtable
===================================================================
--- include/tr1_impl/hashtable	(revision 129314)
+++ include/tr1_impl/hashtable	(working copy)
@@ -252,6 +252,21 @@
       end() const
       { return const_iterator(_M_buckets + _M_bucket_count); }
 
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      const_iterator
+      cbegin() const
+      {
+	const_iterator __i(_M_buckets);
+	if (!__i._M_cur_node)
+	  __i._M_incr_bucket();
+	return __i;
+      }
+
+      const_iterator
+      cend() const
+      { return const_iterator(_M_buckets + _M_bucket_count); }
+#endif
+
       size_type
       size() const
       { return _M_element_count; }
Index: include/tr1_impl/array
===================================================================
--- include/tr1_impl/array	(revision 129314)
+++ include/tr1_impl/array	(working copy)
@@ -97,6 +97,24 @@
       rend() const
       { return const_reverse_iterator(begin()); }
 
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      const_iterator
+      cbegin() const 
+      { return const_iterator(&_M_instance[0]); }
+
+      const_iterator
+      cend() const
+      { return const_iterator(&_M_instance[_Nm]); }
+
+      const_reverse_iterator 
+      crbegin() const
+      { return const_reverse_iterator(end()); }
+
+      const_reverse_iterator 
+      crend() const
+      { return const_reverse_iterator(begin()); }
+#endif
+
       // Capacity.
       size_type 
       size() const { return _Nm; }
Index: include/ext/vstring.h
===================================================================
--- include/ext/vstring.h	(revision 129314)
+++ include/ext/vstring.h	(working copy)
@@ -327,6 +327,42 @@
       rend() const
       { return const_reverse_iterator(this->begin()); }
 
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      /**
+       *  Returns a read-only (constant) iterator that points to the first
+       *  character in the %string.
+       */
+      const_iterator
+      cbegin() const
+      { return const_iterator(this->_M_data()); }
+
+      /**
+       *  Returns a read-only (constant) iterator that points one past the
+       *  last character in the %string.
+       */
+      const_iterator
+      cend() const
+      { return const_iterator(this->_M_data() + this->size()); }
+
+      /**
+       *  Returns a read-only (constant) reverse iterator that points
+       *  to the last character in the %string.  Iteration is done in
+       *  reverse element order.
+       */
+      const_reverse_iterator
+      crbegin() const
+      { return const_reverse_iterator(this->end()); }
+
+      /**
+       *  Returns a read-only (constant) reverse iterator that points
+       *  to one before the first character in the %string.  Iteration
+       *  is done in reverse element order.
+       */
+      const_reverse_iterator
+      crend() const
+      { return const_reverse_iterator(this->begin()); }
+#endif
+
     public:
       // Capacity:
       ///  Returns the number of characters in the string, not including any
Index: include/bits/stl_list.h
===================================================================
--- include/bits/stl_list.h	(revision 129314)
+++ include/bits/stl_list.h	(working copy)
@@ -691,6 +691,44 @@
       rend() const
       { return const_reverse_iterator(begin()); }
 
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      /**
+       *  Returns a read-only (constant) iterator that points to the
+       *  first element in the %list.  Iteration is done in ordinary
+       *  element order.
+       */
+      const_iterator
+      cbegin() const
+      { return const_iterator(this->_M_impl._M_node._M_next); }
+
+      /**
+       *  Returns a read-only (constant) iterator that points one past
+       *  the last element in the %list.  Iteration is done in ordinary
+       *  element order.
+       */
+      const_iterator
+      cend() const
+      { return const_iterator(&this->_M_impl._M_node); }
+
+      /**
+       *  Returns a read-only (constant) reverse iterator that points to
+       *  the last element in the %list.  Iteration is done in reverse
+       *  element order.
+       */
+      const_reverse_iterator
+      crbegin() const
+      { return const_reverse_iterator(end()); }
+
+      /**
+       *  Returns a read-only (constant) reverse iterator that points to one
+       *  before the first element in the %list.  Iteration is done in reverse
+       *  element order.
+       */
+      const_reverse_iterator
+      crend() const
+      { return const_reverse_iterator(begin()); }
+#endif
+
       // [23.2.2.2] capacity
       /**
        *  Returns true if the %list is empty.  (Thus begin() would equal
Index: include/bits/stl_map.h
===================================================================
--- include/bits/stl_map.h	(revision 129314)
+++ include/bits/stl_map.h	(working copy)
@@ -340,6 +340,44 @@
       rend() const
       { return _M_t.rend(); }
 
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      /**
+       *  Returns a read-only (constant) iterator that points to the first pair
+       *  in the %map.  Iteration is done in ascending order according to the
+       *  keys.
+       */
+      const_iterator
+      cbegin() const
+      { return _M_t.begin(); }
+
+      /**
+       *  Returns a read-only (constant) iterator that points one past the last
+       *  pair in the %map.  Iteration is done in ascending order according to
+       *  the keys.
+       */
+      const_iterator
+      cend() const
+      { return _M_t.end(); }
+
+      /**
+       *  Returns a read-only (constant) reverse iterator that points to the
+       *  last pair in the %map.  Iteration is done in descending order
+       *  according to the keys.
+       */
+      const_reverse_iterator
+      crbegin() const
+      { return _M_t.rbegin(); }
+
+      /**
+       *  Returns a read-only (constant) reverse iterator that points to one
+       *  before the first pair in the %map.  Iteration is done in descending
+       *  order according to the keys.
+       */
+      const_reverse_iterator
+      crend() const
+      { return _M_t.rend(); }
+#endif
+
       // capacity
       /** Returns true if the %map is empty.  (Thus begin() would equal
        *  end().)
Index: include/bits/stl_set.h
===================================================================
--- include/bits/stl_set.h	(revision 129314)
+++ include/bits/stl_set.h	(working copy)
@@ -255,25 +255,27 @@
       { return _M_t.get_allocator(); }
 
       /**
-       *  Returns a read/write iterator that points to the first element in the
-       *  %set.  Iteration is done in ascending order according to the keys.
+       *  Returns a read-only (constant) iterator that points to the first
+       *  element in the %set.  Iteration is done in ascending order according
+       *  to the keys.
        */
       iterator
       begin() const
       { return _M_t.begin(); }
 
       /**
-       *  Returns a read/write iterator that points one past the last element in
-       *  the %set.  Iteration is done in ascending order according to the keys.
+       *  Returns a read-only (constant) iterator that points one past the last
+       *  element in the %set.  Iteration is done in ascending order according
+       *  to the keys.
        */
       iterator
       end() const
       { return _M_t.end(); }
 
       /**
-       *  Returns a read/write reverse iterator that points to the last element
-       *  in the %set.  Iteration is done in descending order according to the
-       *  keys.
+       *  Returns a read-only (constant) iterator that points to the last
+       *  element in the %set.  Iteration is done in descending order according
+       *  to the keys.
        */
       reverse_iterator
       rbegin() const
@@ -281,13 +283,51 @@
 
       /**
        *  Returns a read-only (constant) reverse iterator that points to the
-       *  last pair in the %map.  Iteration is done in descending order
+       *  last pair in the %set.  Iteration is done in descending order
        *  according to the keys.
        */
       reverse_iterator
       rend() const
       { return _M_t.rend(); }
 
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      /**
+       *  Returns a read-only (constant) iterator that points to the first
+       *  element in the %set.  Iteration is done in ascending order according
+       *  to the keys.
+       */
+      iterator
+      cbegin() const
+      { return _M_t.begin(); }
+
+      /**
+       *  Returns a read-only (constant) iterator that points one past the last
+       *  element in the %set.  Iteration is done in ascending order according
+       *  to the keys.
+       */
+      iterator
+      cend() const
+      { return _M_t.end(); }
+
+      /**
+       *  Returns a read-only (constant) iterator that points to the last
+       *  element in the %set.  Iteration is done in descending order according
+       *  to the keys.
+       */
+      reverse_iterator
+      crbegin() const
+      { return _M_t.rbegin(); }
+
+      /**
+       *  Returns a read-only (constant) reverse iterator that points to the
+       *  last pair in the %set.  Iteration is done in descending order
+       *  according to the keys.
+       */
+      reverse_iterator
+      crend() const
+      { return _M_t.rend(); }
+#endif
+
       ///  Returns true if the %set is empty.
       bool
       empty() const
Index: include/bits/stl_multimap.h
===================================================================
--- include/bits/stl_multimap.h	(revision 129314)
+++ include/bits/stl_multimap.h	(working copy)
@@ -338,6 +338,44 @@
       rend() const
       { return _M_t.rend(); }
 
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      /**
+       *  Returns a read-only (constant) iterator that points to the first pair
+       *  in the %multimap.  Iteration is done in ascending order according to
+       *  the keys.
+       */
+      const_iterator
+      cbegin() const
+      { return _M_t.begin(); }
+
+      /**
+       *  Returns a read-only (constant) iterator that points one past the last
+       *  pair in the %multimap.  Iteration is done in ascending order according
+       *  to the keys.
+       */
+      const_iterator
+      cend() const
+      { return _M_t.end(); }
+
+      /**
+       *  Returns a read-only (constant) reverse iterator that points to the
+       *  last pair in the %multimap.  Iteration is done in descending order
+       *  according to the keys.
+       */
+      const_reverse_iterator
+      crbegin() const
+      { return _M_t.rbegin(); }
+
+      /**
+       *  Returns a read-only (constant) reverse iterator that points to one
+       *  before the first pair in the %multimap.  Iteration is done in
+       *  descending order according to the keys.
+       */
+      const_reverse_iterator
+      crend() const
+      { return _M_t.rend(); }
+#endif
+
       // capacity
       /** Returns true if the %multimap is empty.  */
       bool
Index: include/bits/stl_vector.h
===================================================================
--- include/bits/stl_vector.h	(revision 129314)
+++ include/bits/stl_vector.h	(working copy)
@@ -430,6 +430,44 @@
       rend() const
       { return const_reverse_iterator(begin()); }
 
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      /**
+       *  Returns a read-only (constant) iterator that points to the
+       *  first element in the %vector.  Iteration is done in ordinary
+       *  element order.
+       */
+      const_iterator
+      cbegin() const
+      { return const_iterator(this->_M_impl._M_start); }
+
+      /**
+       *  Returns a read-only (constant) iterator that points one past
+       *  the last element in the %vector.  Iteration is done in
+       *  ordinary element order.
+       */
+      const_iterator
+      cend() const
+      { return const_iterator(this->_M_impl._M_finish); }
+
+      /**
+       *  Returns a read-only (constant) reverse iterator that points
+       *  to the last element in the %vector.  Iteration is done in
+       *  reverse element order.
+       */
+      const_reverse_iterator
+      crbegin() const
+      { return const_reverse_iterator(end()); }
+
+      /**
+       *  Returns a read-only (constant) reverse iterator that points
+       *  to one before the first element in the %vector.  Iteration
+       *  is done in reverse element order.
+       */
+      const_reverse_iterator
+      crend() const
+      { return const_reverse_iterator(begin()); }
+#endif
+
       // [23.2.4.2] capacity
       /**  Returns the number of elements in the %vector.  */
       size_type
Index: include/bits/stl_deque.h
===================================================================
--- include/bits/stl_deque.h	(revision 129314)
+++ include/bits/stl_deque.h	(working copy)
@@ -909,6 +909,43 @@
       rend() const
       { return const_reverse_iterator(this->_M_impl._M_start); }
 
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      /**
+       *  Returns a read-only (constant) iterator that points to the first
+       *  element in the %deque.  Iteration is done in ordinary element order.
+       */
+      const_iterator
+      cbegin() const
+      { return this->_M_impl._M_start; }
+
+      /**
+       *  Returns a read-only (constant) iterator that points one past
+       *  the last element in the %deque.  Iteration is done in
+       *  ordinary element order.
+       */
+      const_iterator
+      cend() const
+      { return this->_M_impl._M_finish; }
+
+      /**
+       *  Returns a read-only (constant) reverse iterator that points
+       *  to the last element in the %deque.  Iteration is done in
+       *  reverse element order.
+       */
+      const_reverse_iterator
+      crbegin() const
+      { return const_reverse_iterator(this->_M_impl._M_finish); }
+
+      /**
+       *  Returns a read-only (constant) reverse iterator that points
+       *  to one before the first element in the %deque.  Iteration is
+       *  done in reverse element order.
+       */
+      const_reverse_iterator
+      crend() const
+      { return const_reverse_iterator(this->_M_impl._M_start); }
+#endif
+
       // [23.2.1.2] capacity
       /**  Returns the number of elements in the %deque.  */
       size_type
Index: include/bits/stl_multiset.h
===================================================================
--- include/bits/stl_multiset.h	(revision 129314)
+++ include/bits/stl_multiset.h	(working copy)
@@ -248,41 +248,79 @@
       { return _M_t.get_allocator(); }
 
       /**
-       *  Returns a read/write iterator that points to the first element in the
-       *  %multiset.  Iteration is done in ascending order according to the
-       *  keys.
+       *  Returns a read-only (constant) iterator that points to the first
+       *  element in the %multiset.  Iteration is done in ascending order
+       *  according to the keys.
        */
       iterator
       begin() const
       { return _M_t.begin(); }
 
       /**
-       *  Returns a read/write iterator that points one past the last element in
-       *  the %multiset.  Iteration is done in ascending order according to the
-       *  keys.
+       *  Returns a read-only (constant) iterator that points one past the last
+       *  element in the %multiset.  Iteration is done in ascending order
+       *  according to the keys.
        */
       iterator
       end() const
       { return _M_t.end(); }
 
       /**
-       *  Returns a read/write reverse iterator that points to the last element
-       *  in the %multiset.  Iteration is done in descending order according to
-       *  the keys.
+       *  Returns a read-only (constant) reverse iterator that points to the
+       *  last element in the %multiset.  Iteration is done in descending order
+       *  according to the keys.
        */
       reverse_iterator
       rbegin() const
       { return _M_t.rbegin(); }
 
       /**
-       *  Returns a read/write reverse iterator that points to the last element
-       *  in the %multiset.  Iteration is done in descending order according to
-       *  the keys.
+       *  Returns a read-only (constant) reverse iterator that points to the
+       *  last element in the %multiset.  Iteration is done in descending order
+       *  according to the keys.
        */
       reverse_iterator
       rend() const
       { return _M_t.rend(); }
 
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      /**
+       *  Returns a read-only (constant) iterator that points to the first
+       *  element in the %multiset.  Iteration is done in ascending order
+       *  according to the keys.
+       */
+      iterator
+      cbegin() const
+      { return _M_t.begin(); }
+
+      /**
+       *  Returns a read-only (constant) iterator that points one past the last
+       *  element in the %multiset.  Iteration is done in ascending order
+       *  according to the keys.
+       */
+      iterator
+      cend() const
+      { return _M_t.end(); }
+
+      /**
+       *  Returns a read-only (constant) reverse iterator that points to the
+       *  last element in the %multiset.  Iteration is done in descending order
+       *  according to the keys.
+       */
+      reverse_iterator
+      crbegin() const
+      { return _M_t.rbegin(); }
+
+      /**
+       *  Returns a read-only (constant) reverse iterator that points to the
+       *  last element in the %multiset.  Iteration is done in descending order
+       *  according to the keys.
+       */
+      reverse_iterator
+      crend() const
+      { return _M_t.rend(); }
+#endif
+
       ///  Returns true if the %set is empty.
       bool
       empty() const
Index: include/bits/stl_bvector.h
===================================================================
--- include/bits/stl_bvector.h	(revision 129314)
+++ include/bits/stl_bvector.h	(working copy)
@@ -602,6 +602,24 @@
     rend() const
     { return const_reverse_iterator(begin()); }
 
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+    const_iterator
+    cbegin() const
+    { return this->_M_impl._M_start; }
+
+    const_iterator
+    cend() const
+    { return this->_M_impl._M_finish; }
+
+    const_reverse_iterator
+    crbegin() const
+    { return const_reverse_iterator(end()); }
+
+    const_reverse_iterator
+    crend() const
+    { return const_reverse_iterator(begin()); }
+#endif
+
     size_type
     size() const
     { return size_type(end() - begin()); }
Index: testsuite/ext/vstring/requirements/citerators.cc
===================================================================
--- testsuite/ext/vstring/requirements/citerators.cc	(revision 0)
+++ testsuite/ext/vstring/requirements/citerators.cc	(revision 0)
@@ -0,0 +1,53 @@
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-15  Paolo Carlini  <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+#include <ext/vstring.h>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  __gnu_cxx::__vstring v(7, 'a');
+  VERIFY( v.cbegin() == v.begin() );
+  VERIFY( v.cend() == v.end() );
+  VERIFY( v.crbegin() == v.rbegin() );
+  VERIFY( v.crend() == v.rend() );
+  VERIFY( v.cbegin() != v.cend() );
+  VERIFY( v.crbegin() != v.crend() );  
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
Index: testsuite/23_containers/unordered_map/requirements/citerators.cc
===================================================================
--- testsuite/23_containers/unordered_map/requirements/citerators.cc	(revision 0)
+++ testsuite/23_containers/unordered_map/requirements/citerators.cc	(revision 0)
@@ -0,0 +1,51 @@
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-15  Paolo Carlini  <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+#include <unordered_map>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::unordered_map<int, int> um;
+  um[1] = 1;
+  VERIFY( um.cbegin() == um.begin() );
+  VERIFY( um.cend() == um.end() );
+  VERIFY( um.cbegin() != um.cend() );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
Index: testsuite/23_containers/multimap/requirements/citerators.cc
===================================================================
--- testsuite/23_containers/multimap/requirements/citerators.cc	(revision 0)
+++ testsuite/23_containers/multimap/requirements/citerators.cc	(revision 0)
@@ -0,0 +1,55 @@
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-15  Paolo Carlini  <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+#include <map>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  typedef std::multimap<int, int> mm_type;
+  mm_type mm;
+  mm.insert(mm_type::value_type(1, 1));
+  VERIFY( mm.cbegin() == mm.begin() );
+  VERIFY( mm.cend() == mm.end() );
+  VERIFY( mm.crbegin() == mm.rbegin() );
+  VERIFY( mm.crend() == mm.rend() );
+  VERIFY( mm.cbegin() != mm.cend() );
+  VERIFY( mm.crbegin() != mm.crend() );  
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
Index: testsuite/23_containers/set/requirements/citerators.cc
===================================================================
--- testsuite/23_containers/set/requirements/citerators.cc	(revision 0)
+++ testsuite/23_containers/set/requirements/citerators.cc	(revision 0)
@@ -0,0 +1,54 @@
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-15  Paolo Carlini  <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+#include <set>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::set<int> s;
+  s.insert(1);
+  VERIFY( s.cbegin() == s.begin() );
+  VERIFY( s.cend() == s.end() );
+  VERIFY( s.crbegin() == s.rbegin() );
+  VERIFY( s.crend() == s.rend() );
+  VERIFY( s.cbegin() != s.cend() );
+  VERIFY( s.crbegin() != s.crend() );  
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
Index: testsuite/23_containers/unordered_multimap/requirements/citerators.cc
===================================================================
--- testsuite/23_containers/unordered_multimap/requirements/citerators.cc	(revision 0)
+++ testsuite/23_containers/unordered_multimap/requirements/citerators.cc	(revision 0)
@@ -0,0 +1,52 @@
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-15  Paolo Carlini  <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+#include <unordered_map>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  typedef std::unordered_multimap<int, int> umm_type;
+  umm_type umm;
+  umm.insert(umm_type::value_type(1, 1));
+  VERIFY( umm.cbegin() == umm.begin() );
+  VERIFY( umm.cend() == umm.end() );
+  VERIFY( umm.cbegin() != umm.cend() );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
Index: testsuite/23_containers/unordered_set/requirements/citerators.cc
===================================================================
--- testsuite/23_containers/unordered_set/requirements/citerators.cc	(revision 0)
+++ testsuite/23_containers/unordered_set/requirements/citerators.cc	(revision 0)
@@ -0,0 +1,51 @@
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-15  Paolo Carlini  <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+#include <unordered_set>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::unordered_set<int> us;
+  us.insert(1);
+  VERIFY( us.cbegin() == us.begin() );
+  VERIFY( us.cend() == us.end() );
+  VERIFY( us.cbegin() != us.cend() );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
Index: testsuite/23_containers/vector/requirements/citerators.cc
===================================================================
--- testsuite/23_containers/vector/requirements/citerators.cc	(revision 0)
+++ testsuite/23_containers/vector/requirements/citerators.cc	(revision 0)
@@ -0,0 +1,53 @@
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-15  Paolo Carlini  <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+#include <vector>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::vector<int> v(7);
+  VERIFY( v.cbegin() == v.begin() );
+  VERIFY( v.cend() == v.end() );
+  VERIFY( v.crbegin() == v.rbegin() );
+  VERIFY( v.crend() == v.rend() );
+  VERIFY( v.cbegin() != v.cend() );
+  VERIFY( v.crbegin() != v.crend() );  
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
Index: testsuite/23_containers/vector/requirements/dr438/assign_neg.cc
===================================================================
--- testsuite/23_containers/vector/requirements/dr438/assign_neg.cc	(revision 129314)
+++ testsuite/23_containers/vector/requirements/dr438/assign_neg.cc	(working copy)
@@ -19,7 +19,7 @@
 // USA.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 895 }
+// { dg-error "no matching" "" { target *-*-* } 933 }
 // { dg-excess-errors "" }
 
 #include <vector>
Index: testsuite/23_containers/vector/requirements/dr438/insert_neg.cc
===================================================================
--- testsuite/23_containers/vector/requirements/dr438/insert_neg.cc	(revision 129314)
+++ testsuite/23_containers/vector/requirements/dr438/insert_neg.cc	(working copy)
@@ -19,7 +19,7 @@
 // USA.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 936 }
+// { dg-error "no matching" "" { target *-*-* } 974 }
 // { dg-excess-errors "" }
 
 #include <vector>
Index: testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc
===================================================================
--- testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc	(revision 129314)
+++ testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc	(working copy)
@@ -19,7 +19,7 @@
 // USA.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 835 }
+// { dg-error "no matching" "" { target *-*-* } 873 }
 // { dg-excess-errors "" }
 
 #include <vector>
Index: testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc
===================================================================
--- testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc	(revision 129314)
+++ testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc	(working copy)
@@ -19,7 +19,7 @@
 // USA.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 835 }
+// { dg-error "no matching" "" { target *-*-* } 873 }
 // { dg-excess-errors "" }
 
 #include <vector>
Index: testsuite/23_containers/vector/bool/requirements/citerators.cc
===================================================================
--- testsuite/23_containers/vector/bool/requirements/citerators.cc	(revision 0)
+++ testsuite/23_containers/vector/bool/requirements/citerators.cc	(revision 0)
@@ -0,0 +1,53 @@
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-15  Paolo Carlini  <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+#include <vector>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::vector<bool> vb(7);
+  VERIFY( vb.cbegin() == vb.begin() );
+  VERIFY( vb.cend() == vb.end() );
+  VERIFY( vb.crbegin() == vb.rbegin() );
+  VERIFY( vb.crend() == vb.rend() );
+  VERIFY( vb.cbegin() != vb.cend() );
+  VERIFY( vb.crbegin() != vb.crend() );  
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
Index: testsuite/23_containers/deque/requirements/citerators.cc
===================================================================
--- testsuite/23_containers/deque/requirements/citerators.cc	(revision 0)
+++ testsuite/23_containers/deque/requirements/citerators.cc	(revision 0)
@@ -0,0 +1,53 @@
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-15  Paolo Carlini  <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+#include <deque>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::deque<int> d(7);
+  VERIFY( d.cbegin() == d.begin() );
+  VERIFY( d.cend() == d.end() );
+  VERIFY( d.crbegin() == d.rbegin() );
+  VERIFY( d.crend() == d.rend() );
+  VERIFY( d.cbegin() != d.cend() );
+  VERIFY( d.crbegin() != d.crend() );  
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
Index: testsuite/23_containers/deque/requirements/dr438/assign_neg.cc
===================================================================
--- testsuite/23_containers/deque/requirements/dr438/assign_neg.cc	(revision 129314)
+++ testsuite/23_containers/deque/requirements/dr438/assign_neg.cc	(working copy)
@@ -19,7 +19,7 @@
 // USA.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1349 }
+// { dg-error "no matching" "" { target *-*-* } 1386 }
 // { dg-excess-errors "" }
 
 #include <deque>
Index: testsuite/23_containers/deque/requirements/dr438/insert_neg.cc
===================================================================
--- testsuite/23_containers/deque/requirements/dr438/insert_neg.cc	(revision 129314)
+++ testsuite/23_containers/deque/requirements/dr438/insert_neg.cc	(working copy)
@@ -19,7 +19,7 @@
 // USA.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1429 }
+// { dg-error "no matching" "" { target *-*-* } 1466 }
 // { dg-excess-errors "" }
 
 #include <deque>
Index: testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc
===================================================================
--- testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc	(revision 129314)
+++ testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc	(working copy)
@@ -19,7 +19,7 @@
 // USA.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1284 }
+// { dg-error "no matching" "" { target *-*-* } 1321 }
 // { dg-excess-errors "" }
 
 #include <deque>
Index: testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc
===================================================================
--- testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc	(revision 129314)
+++ testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc	(working copy)
@@ -19,7 +19,7 @@
 // USA.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1284 }
+// { dg-error "no matching" "" { target *-*-* } 1321 }
 // { dg-excess-errors "" }
 
 #include <deque>
Index: testsuite/23_containers/multiset/requirements/citerators.cc
===================================================================
--- testsuite/23_containers/multiset/requirements/citerators.cc	(revision 0)
+++ testsuite/23_containers/multiset/requirements/citerators.cc	(revision 0)
@@ -0,0 +1,54 @@
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-15  Paolo Carlini  <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+#include <set>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::multiset<int> ms;
+  ms.insert(1);
+  VERIFY( ms.cbegin() == ms.begin() );
+  VERIFY( ms.cend() == ms.end() );
+  VERIFY( ms.crbegin() == ms.rbegin() );
+  VERIFY( ms.crend() == ms.rend() );
+  VERIFY( ms.cbegin() != ms.cend() );
+  VERIFY( ms.crbegin() != ms.crend() );  
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
Index: testsuite/23_containers/list/requirements/citerators.cc
===================================================================
--- testsuite/23_containers/list/requirements/citerators.cc	(revision 0)
+++ testsuite/23_containers/list/requirements/citerators.cc	(revision 0)
@@ -0,0 +1,53 @@
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-15  Paolo Carlini  <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+#include <list>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::list<int> l(7);
+  VERIFY( l.cbegin() == l.begin() );
+  VERIFY( l.cend() == l.end() );
+  VERIFY( l.crbegin() == l.rbegin() );
+  VERIFY( l.crend() == l.rend() );
+  VERIFY( l.cbegin() != l.cend() );
+  VERIFY( l.crbegin() != l.crend() );  
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
Index: testsuite/23_containers/list/requirements/dr438/assign_neg.cc
===================================================================
--- testsuite/23_containers/list/requirements/dr438/assign_neg.cc	(revision 129314)
+++ testsuite/23_containers/list/requirements/dr438/assign_neg.cc	(working copy)
@@ -19,7 +19,7 @@
 // USA.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1188 }
+// { dg-error "no matching" "" { target *-*-* } 1226 }
 // { dg-excess-errors "" }
 
 #include <list>
Index: testsuite/23_containers/list/requirements/dr438/insert_neg.cc
===================================================================
--- testsuite/23_containers/list/requirements/dr438/insert_neg.cc	(revision 129314)
+++ testsuite/23_containers/list/requirements/dr438/insert_neg.cc	(working copy)
@@ -19,7 +19,7 @@
 // USA.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1157 }
+// { dg-error "no matching" "" { target *-*-* } 1195 }
 // { dg-excess-errors "" }
 
 #include <list>
Index: testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc
===================================================================
--- testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc	(revision 129314)
+++ testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc	(working copy)
@@ -19,7 +19,7 @@
 // USA.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1157 }
+// { dg-error "no matching" "" { target *-*-* } 1195 }
 // { dg-excess-errors "" }
 
 #include <list>
Index: testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc
===================================================================
--- testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc	(revision 129314)
+++ testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc	(working copy)
@@ -19,7 +19,7 @@
 // USA.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1157 }
+// { dg-error "no matching" "" { target *-*-* } 1195 }
 // { dg-excess-errors "" }
 
 #include <list>
Index: testsuite/23_containers/unordered_multiset/requirements/citerators.cc
===================================================================
--- testsuite/23_containers/unordered_multiset/requirements/citerators.cc	(revision 0)
+++ testsuite/23_containers/unordered_multiset/requirements/citerators.cc	(revision 0)
@@ -0,0 +1,51 @@
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-15  Paolo Carlini  <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+#include <unordered_set>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::unordered_multiset<int> ums;
+  ums.insert(1);
+  VERIFY( ums.cbegin() == ums.begin() );
+  VERIFY( ums.cend() == ums.end() );
+  VERIFY( ums.cbegin() != ums.cend() );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
Index: testsuite/23_containers/map/requirements/citerators.cc
===================================================================
--- testsuite/23_containers/map/requirements/citerators.cc	(revision 0)
+++ testsuite/23_containers/map/requirements/citerators.cc	(revision 0)
@@ -0,0 +1,54 @@
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-15  Paolo Carlini  <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+#include <map>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::map<int, int> m;
+  m[1] = 1;
+  VERIFY( m.cbegin() == m.begin() );
+  VERIFY( m.cend() == m.end() );
+  VERIFY( m.crbegin() == m.rbegin() );
+  VERIFY( m.crend() == m.rend() );
+  VERIFY( m.cbegin() != m.cend() );
+  VERIFY( m.crbegin() != m.crend() );  
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
Index: testsuite/23_containers/array/requirements/citerators.cc
===================================================================
--- testsuite/23_containers/array/requirements/citerators.cc	(revision 0)
+++ testsuite/23_containers/array/requirements/citerators.cc	(revision 0)
@@ -0,0 +1,53 @@
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-15  Paolo Carlini  <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+#include <array>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::array<int, 7> a;
+  VERIFY( a.cbegin() == a.begin() );
+  VERIFY( a.cend() == a.end() );
+  VERIFY( a.crbegin() == a.rbegin() );
+  VERIFY( a.crend() == a.rend() );
+  VERIFY( a.cbegin() != a.cend() );
+  VERIFY( a.crbegin() != a.crend() );  
+}
+
+int main()
+{
+  test01();
+  return 0;
+}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]