set.h (set<>::cbegin, [...]): Add.
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. From-SVN: r129370
This commit is contained in:
parent
6b2fe1bcaf
commit
0cd50f8913
45 changed files with 1336 additions and 32 deletions
|
@ -1,3 +1,87 @@
|
|||
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.
|
||||
|
||||
2007-10-15 Paolo Carlini <pcarlini@suse.de>
|
||||
|
||||
PR libstdc++/33773 (cont)
|
||||
|
|
|
@ -602,6 +602,24 @@ template<typename _Alloc>
|
|||
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()); }
|
||||
|
|
|
@ -909,6 +909,43 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
|||
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
|
||||
|
|
|
@ -691,6 +691,44 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
|||
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
|
||||
|
|
|
@ -340,6 +340,44 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
|||
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().)
|
||||
|
|
|
@ -338,6 +338,44 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
|||
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
|
||||
|
|
|
@ -248,41 +248,79 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
|||
{ 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
|
||||
|
|
|
@ -255,25 +255,27 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
|||
{ 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 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
|||
|
||||
/**
|
||||
* 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
|
||||
|
|
|
@ -430,6 +430,44 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
|||
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
|
||||
|
|
|
@ -166,6 +166,24 @@ namespace __debug
|
|||
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;
|
||||
|
|
|
@ -195,6 +195,24 @@ namespace __debug
|
|||
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;
|
||||
|
|
|
@ -156,6 +156,24 @@ namespace __debug
|
|||
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;
|
||||
|
|
|
@ -155,6 +155,24 @@ namespace __debug
|
|||
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;
|
||||
|
|
|
@ -152,6 +152,24 @@ namespace __debug
|
|||
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;
|
||||
|
|
|
@ -152,6 +152,24 @@ namespace __debug
|
|||
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;
|
||||
|
|
|
@ -181,6 +181,24 @@ namespace __debug
|
|||
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;
|
||||
|
|
|
@ -327,6 +327,42 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
|||
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
|
||||
|
|
|
@ -97,6 +97,24 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
|
|||
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; }
|
||||
|
|
|
@ -252,6 +252,21 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
|
|||
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; }
|
||||
|
|
|
@ -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;
|
||||
}
|
|
@ -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;
|
||||
}
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
}
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
}
|
|
@ -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;
|
||||
}
|
|
@ -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;
|
||||
}
|
|
@ -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;
|
||||
}
|
|
@ -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;
|
||||
}
|
|
@ -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;
|
||||
}
|
|
@ -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;
|
||||
}
|
|
@ -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;
|
||||
}
|
|
@ -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;
|
||||
}
|
|
@ -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;
|
||||
}
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
}
|
Loading…
Add table
Reference in a new issue