diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2013-06-27 09:51:21 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2013-06-27 09:51:21 +0000 |
commit | 7b61c5a9cb77eefe5db28b3e3805f042191ad7c3 (patch) | |
tree | 34f47ec02fbda70b1690f99110cc522ce6e593a0 /libstdc++-v3/testsuite/util/exception | |
parent | 5a3fe9b6077ab7fbc9dc200dc9621dabf939c7a9 (diff) | |
download | gcc-7b61c5a9cb77eefe5db28b3e3805f042191ad7c3.zip gcc-7b61c5a9cb77eefe5db28b3e3805f042191ad7c3.tar.gz gcc-7b61c5a9cb77eefe5db28b3e3805f042191ad7c3.tar.bz2 |
stl_deque.h (deque<>::insert(iterator, const value_type&), [...]): Adjust C++11 signatures to take a const_iterator.
2013-06-27 Paolo Carlini <paolo.carlini@oracle.com>
* include/bits/stl_deque.h (deque<>::insert(iterator,
const value_type&), deque<>::insert(iterator, value_type&&),
deque<>::emplace(iterator, _Args&&...)): Adjust C++11 signatures to
take a const_iterator.
(deque<>::erase): Simplify.
* include/bits/stl_list.h: Likewise.
(_List_iterator<>::_M_const_cast): Add.
* include/bits/stl_vector.h: Likewise.
* include/bits/stl_bvector.h: Likewise.
(_Bit_iterator::_M_const_cast): Add.
* include/bits/deque.tcc: Adjust definitions.
* include/bits/list.tcc: Likewise.
* include/bits/vector.tcc: Likewise.
* include/bits/stl_iterator.h (__normal_iterator<>::_M_const_cast):
Define trivial version in C++98 mode.
* include/ext/vstring.h (__versa_string<>::insert(iterator, _CharT),
__versa_string<>::replace(iterator, iterator, const __versa_string&),
__versa_string<>::replace(iterator, iterator, const _CharT*,
size_type), __versa_string<>::replace(iterator, iterator,
const _CharT*), __versa_string<>::replace(iterator, iterator,
size_type, _CharT)): Adjust C++11 signatures to take a pair of
const_iterators.
* include/debug/deque: Adjust.
* include/debug/list: Likewise.
* include/debug/vector: Likewise.
* include/profile/deque: Likewise.
* include/profile/list: Likewise.
* include/profile/vector: Likewise.
(vector<>::emplace): Add.
* testsuite/util/exception/safety.h: Update.
* testsuite/23_containers/deque/modifiers/emplace/const_iterator.cc:
New.
* testsuite/23_containers/deque/modifiers/insert/const_iterator.cc:
Likewise.
* testsuite/23_containers/list/modifiers/emplace/const_iterator.cc:
Likewise.
* testsuite/23_containers/list/modifiers/insert/const_iterator.cc:
Likewise.
* testsuite/23_containers/vector/bool/modifiers/insert/
const_iterator.cc: Likewise.
* testsuite/23_containers/vector/modifiers/emplace/const_iterator.cc:
Likewise.
* testsuite/23_containers/vector/modifiers/insert/const_iterator.cc:
Likewise.
* testsuite/ext/vstring/modifiers/insert/char/const_iterator.cc:
Likewise.
* testsuite/ext/vstring/modifiers/insert/wchar_t/const_iterator.cc:
Likewise.
* testsuite/ext/vstring/modifiers/replace/char/const_iterator.cc:
Likewise.
* testsuite/ext/vstring/modifiers/replace/wchar_t/const_iterator.cc:
Likewise.
* testsuite/ext/vstring/modifiers/char/54577.cc: Move to testsuite/
ext/vstring/modifiers/erase/char/.
* testsuite/ext/vstring/modifiers/wchar_t/54577.cc: Move to testsuite/
ext/vstring/modifiers/wchar_t/.
* testsuite/ext/vstring/modifiers/char/pop_back.cc: Move to testsuite/
ext/vstring/modifiers/pop_back/char/.
* testsuite/ext/vstring/modifiers/wchar_t/pop_back.cc: Move to
testsuite/ext/vstring/modifiers/pop_back/wchar_t/.
* testsuite/23_containers/deque/requirements/dr438/assign_neg.cc:
Adjust dg-error line number.
* 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/deque/requirements/dr438/insert_neg.cc:
Likewise.
* testsuite/23_containers/list/requirements/dr438/assign_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.
* testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
Likewise.
* testsuite/23_containers/vector/requirements/dr438/assign_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/vector/requirements/dr438/insert_neg.cc:
Likewise.
From-SVN: r200458
Diffstat (limited to 'libstdc++-v3/testsuite/util/exception')
-rw-r--r-- | libstdc++-v3/testsuite/util/exception/safety.h | 74 |
1 files changed, 9 insertions, 65 deletions
diff --git a/libstdc++-v3/testsuite/util/exception/safety.h b/libstdc++-v3/testsuite/util/exception/safety.h index c063c9b..5ba9b13 100644 --- a/libstdc++-v3/testsuite/util/exception/safety.h +++ b/libstdc++-v3/testsuite/util/exception/safety.h @@ -265,7 +265,7 @@ namespace __gnu_test : _F_erase_point(&_Tp::erase), _F_erase_range(&_Tp::erase) { } }; - // Specializations, old C++03 signatures. + // Specialization, old C++03 signature. template<typename _Tp1, typename _Tp2, typename _Tp3> struct erase_base<std::basic_string<_Tp1, _Tp2, _Tp3>> { @@ -280,24 +280,6 @@ namespace __gnu_test _F_erase_range(&container_type::erase) { } }; - template<typename _Tp1, typename _Tp2, typename _Tp3, - template <typename, typename, typename> class _Tp4> - struct erase_base<__gnu_cxx::__versa_string<_Tp1, _Tp2, _Tp3, _Tp4>> - { - typedef __gnu_cxx::__versa_string<_Tp1, _Tp2, _Tp3, _Tp4> - container_type; - typedef typename container_type::iterator iterator; - typedef typename container_type::const_iterator const_iterator; - - iterator (container_type::* _F_erase_point)(const_iterator); - iterator (container_type::* _F_erase_range)(const_iterator, - const_iterator); - - erase_base() - : _F_erase_point(&container_type::erase), - _F_erase_range(&container_type::erase) { } - }; - // Specialization, as forward_list has erase_after. template<typename _Tp1, typename _Tp2> struct erase_base<std::forward_list<_Tp1, _Tp2>> @@ -698,47 +680,7 @@ namespace __gnu_test insert_base() : _F_insert_point(&_Tp::insert) { } }; - // Specializations, old C++03 signatures. - template<typename _Tp1, typename _Tp2> - struct insert_base<std::deque<_Tp1, _Tp2>> - { - typedef std::deque<_Tp1, _Tp2> container_type; - typedef typename container_type::iterator iterator; - typedef typename container_type::value_type value_type; - - iterator (container_type::* _F_insert_point)(iterator, - const value_type&); - - insert_base() : _F_insert_point(&container_type::insert) { } - }; - - template<typename _Tp1, typename _Tp2> - struct insert_base<std::list<_Tp1, _Tp2>> - { - typedef std::list<_Tp1, _Tp2> container_type; - typedef typename container_type::iterator iterator; - typedef typename container_type::value_type value_type; - - iterator (container_type::* _F_insert_point)(iterator, - const value_type&); - - insert_base() : _F_insert_point(&container_type::insert) { } - }; - - template<typename _Tp1, typename _Tp2> - struct insert_base<std::vector<_Tp1, _Tp2>> - { - typedef std::vector<_Tp1, _Tp2> container_type; - typedef typename container_type::iterator iterator; - typedef typename container_type::value_type value_type; - - iterator (container_type::* _F_insert_point)(iterator, - const value_type&); - - insert_base() : _F_insert_point(&container_type::insert) { } - }; - - // Specialization, as string insertion has a different signature. + // Specialization, old C++03 signature. template<typename _Tp1, typename _Tp2, typename _Tp3> struct insert_base<std::basic_string<_Tp1, _Tp2, _Tp3>> { @@ -751,17 +693,19 @@ namespace __gnu_test insert_base() : _F_insert_point(&container_type::insert) { } }; - // Likewise for __versa_string. + // Specialization, by value. template<typename _Tp1, typename _Tp2, typename _Tp3, template <typename, typename, typename> class _Tp4> struct insert_base<__gnu_cxx::__versa_string<_Tp1, _Tp2, _Tp3, _Tp4>> { typedef __gnu_cxx::__versa_string<_Tp1, _Tp2, _Tp3, _Tp4> - container_type; - typedef typename container_type::iterator iterator; - typedef typename container_type::value_type value_type; + container_type; + typedef typename container_type::iterator iterator; + typedef typename container_type::const_iterator const_iterator; + typedef typename container_type::value_type value_type; - iterator (container_type::* _F_insert_point)(iterator, value_type); + iterator (container_type::* _F_insert_point)(const_iterator, + value_type); insert_base() : _F_insert_point(&container_type::insert) { } }; |