2003-11-12 04:09:16 +08:00
|
|
|
// Debugging string implementation -*- C++ -*-
|
|
|
|
|
2018-01-03 18:03:58 +08:00
|
|
|
// Copyright (C) 2003-2018 Free Software Foundation, Inc.
|
2003-11-12 04:09:16 +08:00
|
|
|
//
|
|
|
|
// 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
|
2009-04-09 23:00:19 +08:00
|
|
|
// Free Software Foundation; either version 3, or (at your option)
|
2003-11-12 04:09:16 +08:00
|
|
|
// 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.
|
|
|
|
|
2009-04-09 23:00:19 +08:00
|
|
|
// Under Section 7 of GPL version 3, you are granted additional
|
|
|
|
// permissions described in the GCC Runtime Library Exception, version
|
|
|
|
// 3.1, as published by the Free Software Foundation.
|
|
|
|
|
|
|
|
// You should have received a copy of the GNU General Public License and
|
|
|
|
// a copy of the GCC Runtime Library Exception along with this program;
|
|
|
|
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
|
|
|
// <http://www.gnu.org/licenses/>.
|
2003-11-12 04:09:16 +08:00
|
|
|
|
2006-11-30 04:59:22 +08:00
|
|
|
/** @file debug/string
|
|
|
|
* This file is a GNU debug extension to the Standard C++ Library.
|
|
|
|
*/
|
|
|
|
|
2003-11-12 04:09:16 +08:00
|
|
|
#ifndef _GLIBCXX_DEBUG_STRING
|
|
|
|
#define _GLIBCXX_DEBUG_STRING 1
|
|
|
|
|
2016-05-13 22:47:46 +08:00
|
|
|
#pragma GCC system_header
|
|
|
|
|
2003-11-12 04:09:16 +08:00
|
|
|
#include <string>
|
|
|
|
#include <debug/safe_sequence.h>
|
2014-05-07 03:59:44 +08:00
|
|
|
#include <debug/safe_container.h>
|
2003-11-12 04:09:16 +08:00
|
|
|
#include <debug/safe_iterator.h>
|
|
|
|
|
|
|
|
namespace __gnu_debug
|
|
|
|
{
|
2015-09-11 19:02:14 +08:00
|
|
|
/// Class std::basic_string with safety/checking/debug instrumentation.
|
|
|
|
template<typename _CharT, typename _Traits = std::char_traits<_CharT>,
|
|
|
|
typename _Allocator = std::allocator<_CharT> >
|
|
|
|
class basic_string
|
|
|
|
: public __gnu_debug::_Safe_container<
|
|
|
|
basic_string<_CharT, _Traits, _Allocator>,
|
2017-05-13 05:19:39 +08:00
|
|
|
_Allocator, _Safe_sequence, bool(_GLIBCXX_USE_CXX11_ABI)>,
|
2015-09-11 19:02:14 +08:00
|
|
|
public std::basic_string<_CharT, _Traits, _Allocator>
|
|
|
|
{
|
|
|
|
typedef std::basic_string<_CharT, _Traits, _Allocator> _Base;
|
|
|
|
typedef __gnu_debug::_Safe_container<
|
2017-05-13 05:19:39 +08:00
|
|
|
basic_string, _Allocator, _Safe_sequence, bool(_GLIBCXX_USE_CXX11_ABI)>
|
|
|
|
_Safe;
|
2003-11-12 04:09:16 +08:00
|
|
|
|
|
|
|
public:
|
|
|
|
// types:
|
2014-05-07 03:59:44 +08:00
|
|
|
typedef _Traits traits_type;
|
|
|
|
typedef typename _Traits::char_type value_type;
|
|
|
|
typedef _Allocator allocator_type;
|
|
|
|
typedef typename _Base::size_type size_type;
|
|
|
|
typedef typename _Base::difference_type difference_type;
|
|
|
|
typedef typename _Base::reference reference;
|
|
|
|
typedef typename _Base::const_reference const_reference;
|
|
|
|
typedef typename _Base::pointer pointer;
|
|
|
|
typedef typename _Base::const_pointer const_pointer;
|
|
|
|
|
|
|
|
typedef __gnu_debug::_Safe_iterator<
|
|
|
|
typename _Base::iterator, basic_string> iterator;
|
|
|
|
typedef __gnu_debug::_Safe_iterator<
|
|
|
|
typename _Base::const_iterator, basic_string> const_iterator;
|
|
|
|
|
|
|
|
typedef std::reverse_iterator<iterator> reverse_iterator;
|
|
|
|
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
|
2003-11-12 04:09:16 +08:00
|
|
|
|
|
|
|
using _Base::npos;
|
|
|
|
|
2015-09-11 19:02:14 +08:00
|
|
|
basic_string()
|
|
|
|
_GLIBCXX_NOEXCEPT_IF(std::is_nothrow_default_constructible<_Base>::value)
|
|
|
|
: _Base() { }
|
|
|
|
|
2003-11-12 04:09:16 +08:00
|
|
|
// 21.3.1 construct/copy/destroy:
|
2015-09-11 19:02:14 +08:00
|
|
|
explicit
|
|
|
|
basic_string(const _Allocator& __a) _GLIBCXX_NOEXCEPT
|
2014-05-07 03:59:44 +08:00
|
|
|
: _Base(__a) { }
|
2003-11-12 04:09:16 +08:00
|
|
|
|
2014-05-07 03:59:44 +08:00
|
|
|
#if __cplusplus < 201103L
|
2003-11-12 04:09:16 +08:00
|
|
|
basic_string(const basic_string& __str)
|
2014-05-07 03:59:44 +08:00
|
|
|
: _Base(__str) { }
|
|
|
|
|
|
|
|
~basic_string() { }
|
|
|
|
#else
|
|
|
|
basic_string(const basic_string&) = default;
|
|
|
|
basic_string(basic_string&&) = default;
|
|
|
|
|
|
|
|
basic_string(std::initializer_list<_CharT> __l,
|
|
|
|
const _Allocator& __a = _Allocator())
|
|
|
|
: _Base(__l, __a)
|
2003-11-12 04:09:16 +08:00
|
|
|
{ }
|
|
|
|
|
2015-09-11 19:02:14 +08:00
|
|
|
#if _GLIBCXX_USE_CXX11_ABI
|
|
|
|
basic_string(const basic_string& __s, const _Allocator& __a)
|
|
|
|
: _Base(__s, __a) { }
|
|
|
|
|
|
|
|
basic_string(basic_string&& __s, const _Allocator& __a)
|
|
|
|
: _Base(std::move(__s), __a) { }
|
|
|
|
#endif
|
|
|
|
|
2014-05-07 03:59:44 +08:00
|
|
|
~basic_string() = default;
|
2015-09-11 19:02:14 +08:00
|
|
|
|
|
|
|
// Provides conversion from a normal-mode string to a debug-mode string
|
|
|
|
basic_string(_Base&& __base) noexcept
|
|
|
|
: _Base(std::move(__base)) { }
|
2014-05-07 03:59:44 +08:00
|
|
|
#endif // C++11
|
|
|
|
|
|
|
|
// Provides conversion from a normal-mode string to a debug-mode string
|
|
|
|
basic_string(const _Base& __base)
|
|
|
|
: _Base(__base) { }
|
|
|
|
|
2003-11-12 04:09:16 +08:00
|
|
|
// _GLIBCXX_RESOLVE_LIB_DEFECTS
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
// 42. string ctors specify wrong default allocator
|
2003-11-12 04:09:16 +08:00
|
|
|
basic_string(const basic_string& __str, size_type __pos,
|
2014-05-07 03:59:44 +08:00
|
|
|
size_type __n = _Base::npos,
|
|
|
|
const _Allocator& __a = _Allocator())
|
|
|
|
: _Base(__str, __pos, __n, __a) { }
|
2003-11-12 04:09:16 +08:00
|
|
|
|
|
|
|
basic_string(const _CharT* __s, size_type __n,
|
|
|
|
const _Allocator& __a = _Allocator())
|
2014-05-07 03:59:44 +08:00
|
|
|
: _Base(__gnu_debug::__check_string(__s, __n), __n, __a) { }
|
2003-11-12 04:09:16 +08:00
|
|
|
|
|
|
|
basic_string(const _CharT* __s, const _Allocator& __a = _Allocator())
|
|
|
|
: _Base(__gnu_debug::__check_string(__s), __a)
|
|
|
|
{ this->assign(__s); }
|
|
|
|
|
|
|
|
basic_string(size_type __n, _CharT __c,
|
|
|
|
const _Allocator& __a = _Allocator())
|
2014-05-07 03:59:44 +08:00
|
|
|
: _Base(__n, __c, __a) { }
|
2003-11-12 04:09:16 +08:00
|
|
|
|
|
|
|
template<typename _InputIterator>
|
|
|
|
basic_string(_InputIterator __begin, _InputIterator __end,
|
[multiple changes]
2010-08-29 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/23_containers/bitset/invalidation: Move...
* testsuite/23_containers/bitset/debug/invalidation: ... here.
* testsuite/23_containers/deque/invalidation: Move...
* testsuite/23_containers/deque/debug/invalidation: ... here.
* testsuite/23_containers/list/invalidation: Move...
* testsuite/23_containers/list/debug/invalidation: ... here.
* testsuite/23_containers/map/invalidation: Move...
* testsuite/23_containers/map/debug/invalidation: ... here.
* testsuite/23_containers/multimap/invalidation: Move...
* testsuite/23_containers/multimap/debug/invalidation: ... here.
* testsuite/23_containers/set/invalidation: Move...
* testsuite/23_containers/set/debug/invalidation: ... here.
* testsuite/23_containers/multiset/invalidation: Move...
* testsuite/23_containers/multiset/debug/invalidation: ... here.
* testsuite/23_containers/vector/invalidation: Move...
* testsuite/23_containers/vector/debug/invalidation: ... here.
2010-08-29 François Dumont <francois.cppdevs@free.fr>
* include/bits/stl_algobase.h (_Iter_base): Move...
* include/bits/stl_iterator_base_types.h: ...here.
* include/debug/functions.h (__check_valid_range, __check_string,
__check_sorted): Fix to not depend on _GLIBCXX_DEBUG; include
formatter.h and use formatting macros for a consistent debug result.
* include/debug/formatter.h (__check_singular): Declare; do not
include debug.h.
* include/debug/debug.h: Do not include formatter.h.
* include/debug/safe_iterator.h (_Safe_iterator::_Base_Iterator)
rename to iterator_type.
(__gnu_debug::__base): Add.
* include/debug/set.h: Use everywhere __gnu_debug::__base once
iterator range valided.
* include/debug/unordered_map: Likewise.
* include/debug/multiset.h: Likewise.
* include/debug/vector: Likewise.
* include/debug/unordered_set: Likewise.
* include/debug/deque: Likewise.
* include/debug/map.h: Likewise.
* include/debug/string: Likewise.
* include/debug/list: Likewise.
* include/debug/multimap.h: Likewise.
* testsuite/23_containers/util/debug/assign_neg.h: New test cases on
debug checks performed on container assign operation.
* testsuite/23_containers/util/debug/construct_neg.h: New test cases
on debug checks on constructors.
* testsuite/23_containers/util/debug/insert_neg.h: New test cases on
debug checks performed on container insert operations.
* testsuite/23_containers/unordered_map/debug/cont_traits.h,
debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
insert3_neg.cc, insert4_neg.cc: New.
* testsuite/23_containers/multimap/debug/cont_traits.h,
debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
insert3_neg.cc, insert4_neg.cc: Likewise.
* testsuite/23_containers/set/debug/cont_traits.h,
debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
insert3_neg.cc, insert4_neg.cc: Likewise.
* testsuite/23_containers/unordered_multimap/debug/cont_traits.h,
debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
insert3_neg.cc, insert4_neg.cc: Likewise.
* testsuite/23_containers/unordered_set/debug/cont_traits.h,
debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
insert3_neg.cc, insert4_neg.cc: Likewise.
* testsuite/23_containers/multiset/debug/cont_traits.h,
debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
insert3_neg.cc, insert4_neg.cc: Likewise.
* testsuite/23_containers/unordered_multiset/debug/cont_traits.h,
debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
insert3_neg.cc, insert4_neg.cc: Likewise.
* testsuite/23_containers/map/debug/cont_traits.h,
debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
insert3_neg.cc, insert4_neg.cc: Likewise.
* testsuite/23_containers/vector/debug/cont_traits.h,
debug_cont_traits.h, assign1_neg.cc, assign2_neg.cc, assign3_neg.cc,
assign4_neg.cc, construct1_neg.cc, construct2_neg.cc,
construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
insert3_neg.cc, insert4_neg.cc: Likewise.
* testsuite/23_containers/deque/debug/cont_traits.h,
debug_cont_traits.h, assign1_neg.cc, assign2_neg.cc, assign3_neg.cc,
assign4_neg.cc, construct1_neg.cc, construct2_neg.cc,
construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
insert3_neg.cc, insert4_neg.cc: Likewise.
* testsuite/23_containers/list/debug/cont_traits.h,
debug_cont_traits.h, assign1_neg.cc, assign2_neg.cc, assign3_neg.cc,
assign4_neg.cc, construct1_neg.cc, construct2_neg.cc,
construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
insert3_neg.cc, insert4_neg.cc: Likewise.
* testsuite/performance/23_containers/range_construct/
list_construct1.cc: New, validate performance impact of the patch
on the debug mode.
* testsuite/performance/23_containers/range_construct/
list_construct2.cc: Likewise.
* testsuite/performance/23_containers/range_construct/
vector_construct.cc: Likewise.
* testsuite/performance/23_containers/range_construct/
deque_construct.cc: Likewise.
From-SVN: r163628
2010-08-30 01:39:00 +08:00
|
|
|
const _Allocator& __a = _Allocator())
|
macros.h (__glibcxx_check_valid_range_at): New.
2018-05-08 François Dumont <fdumont@gcc.gnu.org>
* include/debug/macros.h (__glibcxx_check_valid_range_at): New.
* include/debug/functions.h (__check_valid_range): Use latter.
* include/debug/macros.h (__glibcxx_check_valid_constructor_range): New,
use latter.
* include/debug/deque
(deque::deque<_Iter>(_Iter, _Iter, const _Alloc&)): Use latter.
* include/debug/forward_list
(forward_list::forward_list<_Iter>(_Iter, _Iter, const _Alloc&)):
Likewise.
* include/debug/list
(list::list<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
* include/debug/list
(list::list<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
* include/debug/map.h
(map::map<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
(map::map<_Iter>(_Iter, _Iter, const _Compare&, const _Alloc&)):
Likewise.
* include/debug/multimap.h
(multimap::multimap<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
(multimap::multimap<_Iter>(_Iter, _Iter, const _Compare&,
const _Alloc&)): Likewise.
* include/debug/set.h
(set::set<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
(set::set<_Iter>(_Iter, _Iter, const _Compare&, const _Alloc&)):
Likewise.
* include/debug/multiset.h
(multiset::multiset<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
(multiset::multiset<_Iter>(_Iter, _Iter, const _Compare&,
const _Alloc&)): Likewise.
* include/debug/string
(basic_string::basic_string<_Iter>(_Iter, _Iter, const _Alloc&)):
Likewise.
* include/debug/unordered_map
(unordered_map::unordered_map<_Iter>(_Iter, _Iter, const _Alloc&)):
Likewise.
(unordered_multimap::unordered_multimap<_Iter>(_Iter, _Iter,
const _Alloc&)): Likewise.
* include/debug/unordered_set
(unordered_set::unordered_set<_Iter>(_Iter, _Iter, const _Alloc&)):
Likewise.
(unordered_multiset::unordered_multiset<_Iter>(_Iter, _Iter,
const _Alloc&)): Likewise.
* include/debug/vector
(vector::vector<_Iter>(_Iter, _Iter, const _Alloc&)): Use latter.
From-SVN: r260053
2018-05-09 03:46:59 +08:00
|
|
|
: _Base(__gnu_debug::__base(
|
|
|
|
__glibcxx_check_valid_constructor_range(__begin, __end)),
|
2014-05-07 03:59:44 +08:00
|
|
|
__gnu_debug::__base(__end), __a) { }
|
2003-11-12 04:09:16 +08:00
|
|
|
|
2014-05-07 03:59:44 +08:00
|
|
|
#if __cplusplus < 201103L
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
basic_string&
|
2003-11-12 04:09:16 +08:00
|
|
|
operator=(const basic_string& __str)
|
|
|
|
{
|
2014-05-07 03:59:44 +08:00
|
|
|
this->_M_safe() = __str;
|
|
|
|
_M_base() = __str;
|
2003-11-12 04:09:16 +08:00
|
|
|
return *this;
|
|
|
|
}
|
2014-05-07 03:59:44 +08:00
|
|
|
#else
|
|
|
|
basic_string&
|
|
|
|
operator=(const basic_string&) = default;
|
|
|
|
|
|
|
|
basic_string&
|
|
|
|
operator=(basic_string&&) = default;
|
|
|
|
#endif
|
2003-11-12 04:09:16 +08:00
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
basic_string&
|
2003-11-12 04:09:16 +08:00
|
|
|
operator=(const _CharT* __s)
|
|
|
|
{
|
|
|
|
__glibcxx_check_string(__s);
|
2014-05-07 03:59:44 +08:00
|
|
|
_M_base() = __s;
|
2003-11-12 04:09:16 +08:00
|
|
|
this->_M_invalidate_all();
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
basic_string&
|
2003-11-12 04:09:16 +08:00
|
|
|
operator=(_CharT __c)
|
|
|
|
{
|
2014-05-07 03:59:44 +08:00
|
|
|
_M_base() = __c;
|
2003-11-12 04:09:16 +08:00
|
|
|
this->_M_invalidate_all();
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2012-11-11 01:27:22 +08:00
|
|
|
#if __cplusplus >= 201103L
|
2010-01-11 00:15:58 +08:00
|
|
|
basic_string&
|
|
|
|
operator=(std::initializer_list<_CharT> __l)
|
2008-07-22 03:40:39 +08:00
|
|
|
{
|
2014-05-07 03:59:44 +08:00
|
|
|
_M_base() = __l;
|
2008-07-22 03:40:39 +08:00
|
|
|
this->_M_invalidate_all();
|
|
|
|
return *this;
|
|
|
|
}
|
2012-11-11 01:27:22 +08:00
|
|
|
#endif // C++11
|
2008-07-22 03:40:39 +08:00
|
|
|
|
2003-11-12 04:09:16 +08:00
|
|
|
// 21.3.2 iterators:
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
iterator
|
re PR libstdc++/58338 (Add noexcept to functions with a narrow contract)
2013-09-24 Marc Glisse <marc.glisse@inria.fr>
PR libstdc++/58338
PR libstdc++/56166
* include/bits/basic_string.h (basic_string)
[basic_string(basic_string&&)]: Make the noexcept conditional.
[operator=(basic_string&&), assign(basic_string&&)]: Link to PR 58265.
[begin(), end(), rbegin(), rend(), clear]: Remove noexcept.
[pop_back]: Comment on the lack of noexcept.
* include/debug/string (basic_string) [basic_string(const _Allocator&),
basic_string(basic_string&&), begin(), end(), rbegin(), rend(), clear,
operator[](size_type), pop_back]: Comment out noexcept, until vstring
replaces basic_string.
From-SVN: r202861
2013-09-24 18:07:32 +08:00
|
|
|
begin() // _GLIBCXX_NOEXCEPT
|
2003-11-12 04:09:16 +08:00
|
|
|
{ return iterator(_Base::begin(), this); }
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
const_iterator
|
2011-05-31 20:50:31 +08:00
|
|
|
begin() const _GLIBCXX_NOEXCEPT
|
2003-11-12 04:09:16 +08:00
|
|
|
{ return const_iterator(_Base::begin(), this); }
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
iterator
|
re PR libstdc++/58338 (Add noexcept to functions with a narrow contract)
2013-09-24 Marc Glisse <marc.glisse@inria.fr>
PR libstdc++/58338
PR libstdc++/56166
* include/bits/basic_string.h (basic_string)
[basic_string(basic_string&&)]: Make the noexcept conditional.
[operator=(basic_string&&), assign(basic_string&&)]: Link to PR 58265.
[begin(), end(), rbegin(), rend(), clear]: Remove noexcept.
[pop_back]: Comment on the lack of noexcept.
* include/debug/string (basic_string) [basic_string(const _Allocator&),
basic_string(basic_string&&), begin(), end(), rbegin(), rend(), clear,
operator[](size_type), pop_back]: Comment out noexcept, until vstring
replaces basic_string.
From-SVN: r202861
2013-09-24 18:07:32 +08:00
|
|
|
end() // _GLIBCXX_NOEXCEPT
|
2003-11-12 04:09:16 +08:00
|
|
|
{ return iterator(_Base::end(), this); }
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
const_iterator
|
2011-05-31 20:50:31 +08:00
|
|
|
end() const _GLIBCXX_NOEXCEPT
|
2003-11-12 04:09:16 +08:00
|
|
|
{ return const_iterator(_Base::end(), this); }
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
reverse_iterator
|
re PR libstdc++/58338 (Add noexcept to functions with a narrow contract)
2013-09-24 Marc Glisse <marc.glisse@inria.fr>
PR libstdc++/58338
PR libstdc++/56166
* include/bits/basic_string.h (basic_string)
[basic_string(basic_string&&)]: Make the noexcept conditional.
[operator=(basic_string&&), assign(basic_string&&)]: Link to PR 58265.
[begin(), end(), rbegin(), rend(), clear]: Remove noexcept.
[pop_back]: Comment on the lack of noexcept.
* include/debug/string (basic_string) [basic_string(const _Allocator&),
basic_string(basic_string&&), begin(), end(), rbegin(), rend(), clear,
operator[](size_type), pop_back]: Comment out noexcept, until vstring
replaces basic_string.
From-SVN: r202861
2013-09-24 18:07:32 +08:00
|
|
|
rbegin() // _GLIBCXX_NOEXCEPT
|
2003-11-12 04:09:16 +08:00
|
|
|
{ return reverse_iterator(end()); }
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
const_reverse_iterator
|
2011-05-31 20:50:31 +08:00
|
|
|
rbegin() const _GLIBCXX_NOEXCEPT
|
2003-11-12 04:09:16 +08:00
|
|
|
{ return const_reverse_iterator(end()); }
|
|
|
|
|
|
|
|
reverse_iterator
|
re PR libstdc++/58338 (Add noexcept to functions with a narrow contract)
2013-09-24 Marc Glisse <marc.glisse@inria.fr>
PR libstdc++/58338
PR libstdc++/56166
* include/bits/basic_string.h (basic_string)
[basic_string(basic_string&&)]: Make the noexcept conditional.
[operator=(basic_string&&), assign(basic_string&&)]: Link to PR 58265.
[begin(), end(), rbegin(), rend(), clear]: Remove noexcept.
[pop_back]: Comment on the lack of noexcept.
* include/debug/string (basic_string) [basic_string(const _Allocator&),
basic_string(basic_string&&), begin(), end(), rbegin(), rend(), clear,
operator[](size_type), pop_back]: Comment out noexcept, until vstring
replaces basic_string.
From-SVN: r202861
2013-09-24 18:07:32 +08:00
|
|
|
rend() // _GLIBCXX_NOEXCEPT
|
2003-11-12 04:09:16 +08:00
|
|
|
{ return reverse_iterator(begin()); }
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
const_reverse_iterator
|
2011-05-31 20:50:31 +08:00
|
|
|
rend() const _GLIBCXX_NOEXCEPT
|
2003-11-12 04:09:16 +08:00
|
|
|
{ return const_reverse_iterator(begin()); }
|
|
|
|
|
2012-11-11 01:27:22 +08:00
|
|
|
#if __cplusplus >= 201103L
|
2011-05-31 20:50:31 +08:00
|
|
|
const_iterator
|
|
|
|
cbegin() const noexcept
|
|
|
|
{ return const_iterator(_Base::begin(), this); }
|
|
|
|
|
|
|
|
const_iterator
|
|
|
|
cend() const noexcept
|
|
|
|
{ return const_iterator(_Base::end(), this); }
|
|
|
|
|
|
|
|
const_reverse_iterator
|
|
|
|
crbegin() const noexcept
|
|
|
|
{ return const_reverse_iterator(end()); }
|
|
|
|
|
|
|
|
const_reverse_iterator
|
|
|
|
crend() const noexcept
|
|
|
|
{ return const_reverse_iterator(begin()); }
|
|
|
|
#endif
|
|
|
|
|
2003-11-12 04:09:16 +08:00
|
|
|
// 21.3.3 capacity:
|
|
|
|
using _Base::size;
|
|
|
|
using _Base::length;
|
|
|
|
using _Base::max_size;
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
void
|
2003-11-12 04:09:16 +08:00
|
|
|
resize(size_type __n, _CharT __c)
|
|
|
|
{
|
|
|
|
_Base::resize(__n, __c);
|
|
|
|
this->_M_invalidate_all();
|
|
|
|
}
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
void
|
2003-11-12 04:09:16 +08:00
|
|
|
resize(size_type __n)
|
|
|
|
{ this->resize(__n, _CharT()); }
|
|
|
|
|
2012-11-11 01:27:22 +08:00
|
|
|
#if __cplusplus >= 201103L
|
2011-06-12 23:51:36 +08:00
|
|
|
void
|
re PR libstdc++/58338 (Add noexcept to functions with a narrow contract)
2013-09-19 Marc Glisse <marc.glisse@inria.fr>
PR libstdc++/58338
* include/bits/stl_tree.h (_Rb_tree_node_base) [_S_minimum, _S_maximum]:
Mark as noexcept.
(_Rb_tree_iterator) [_Rb_tree_iterator, operator*, operator->,
operator++, operator--, operator==, operator!=]: Likewise.
(_Rb_tree_const_iterator) [_Rb_tree_const_iterator, _M_const_cast,
operator*, operator->, operator++, operator--, operator==, operator!=]:
Likewise.
(operator==(const _Rb_tree_iterator&, const _Rb_tree_const_iterator&),
operator!=(const _Rb_tree_iterator&, const _Rb_tree_const_iterator&)):
Likewise.
(_Rb_tree) [_M_put_node, _M_destroy_node, _M_root, _M_leftmost,
_M_rightmost, _M_begin, _M_end, _S_left, _S_right, _S_minimum,
_S_maximum]: Likewise.
* include/debug/string (basic_string) [basic_string(const _Allocator&),
shrink_to_fit, operator[], pop_back]: Likewise.
* include/ext/vstring.h (__versa_string) [_M_limit, _M_disjunct,
_M_ibegin, _M_iend, __versa_string(const _Alloc&),
operator=(__versa_string&&), shrink_to_fit, operator[], front,
back, assign(__versa_string&&), swap]: Likewise.
(__versa_string) [__versa_string(), __versa_string(const _Alloc&)]:
Merge.
From-SVN: r202737
2013-09-19 19:40:29 +08:00
|
|
|
shrink_to_fit() noexcept
|
2011-06-12 23:51:36 +08:00
|
|
|
{
|
|
|
|
if (capacity() > size())
|
|
|
|
{
|
|
|
|
__try
|
|
|
|
{
|
|
|
|
reserve(0);
|
|
|
|
this->_M_invalidate_all();
|
|
|
|
}
|
|
|
|
__catch(...)
|
|
|
|
{ }
|
|
|
|
}
|
|
|
|
}
|
2010-01-08 21:01:24 +08:00
|
|
|
#endif
|
|
|
|
|
2003-11-12 04:09:16 +08:00
|
|
|
using _Base::capacity;
|
|
|
|
using _Base::reserve;
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
void
|
re PR libstdc++/58338 (Add noexcept to functions with a narrow contract)
2013-09-24 Marc Glisse <marc.glisse@inria.fr>
PR libstdc++/58338
PR libstdc++/56166
* include/bits/basic_string.h (basic_string)
[basic_string(basic_string&&)]: Make the noexcept conditional.
[operator=(basic_string&&), assign(basic_string&&)]: Link to PR 58265.
[begin(), end(), rbegin(), rend(), clear]: Remove noexcept.
[pop_back]: Comment on the lack of noexcept.
* include/debug/string (basic_string) [basic_string(const _Allocator&),
basic_string(basic_string&&), begin(), end(), rbegin(), rend(), clear,
operator[](size_type), pop_back]: Comment out noexcept, until vstring
replaces basic_string.
From-SVN: r202861
2013-09-24 18:07:32 +08:00
|
|
|
clear() // _GLIBCXX_NOEXCEPT
|
2003-11-12 04:09:16 +08:00
|
|
|
{
|
|
|
|
_Base::clear();
|
|
|
|
this->_M_invalidate_all();
|
|
|
|
}
|
|
|
|
|
|
|
|
using _Base::empty;
|
|
|
|
|
|
|
|
// 21.3.4 element access:
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
const_reference
|
re PR libstdc++/58338 (Add noexcept to functions with a narrow contract)
2013-09-19 Marc Glisse <marc.glisse@inria.fr>
PR libstdc++/58338
* include/bits/stl_tree.h (_Rb_tree_node_base) [_S_minimum, _S_maximum]:
Mark as noexcept.
(_Rb_tree_iterator) [_Rb_tree_iterator, operator*, operator->,
operator++, operator--, operator==, operator!=]: Likewise.
(_Rb_tree_const_iterator) [_Rb_tree_const_iterator, _M_const_cast,
operator*, operator->, operator++, operator--, operator==, operator!=]:
Likewise.
(operator==(const _Rb_tree_iterator&, const _Rb_tree_const_iterator&),
operator!=(const _Rb_tree_iterator&, const _Rb_tree_const_iterator&)):
Likewise.
(_Rb_tree) [_M_put_node, _M_destroy_node, _M_root, _M_leftmost,
_M_rightmost, _M_begin, _M_end, _S_left, _S_right, _S_minimum,
_S_maximum]: Likewise.
* include/debug/string (basic_string) [basic_string(const _Allocator&),
shrink_to_fit, operator[], pop_back]: Likewise.
* include/ext/vstring.h (__versa_string) [_M_limit, _M_disjunct,
_M_ibegin, _M_iend, __versa_string(const _Alloc&),
operator=(__versa_string&&), shrink_to_fit, operator[], front,
back, assign(__versa_string&&), swap]: Likewise.
(__versa_string) [__versa_string(), __versa_string(const _Alloc&)]:
Merge.
From-SVN: r202737
2013-09-19 19:40:29 +08:00
|
|
|
operator[](size_type __pos) const _GLIBCXX_NOEXCEPT
|
2003-11-12 04:09:16 +08:00
|
|
|
{
|
|
|
|
_GLIBCXX_DEBUG_VERIFY(__pos <= this->size(),
|
2005-12-19 08:56:05 +08:00
|
|
|
_M_message(__gnu_debug::__msg_subscript_oob)
|
2003-11-12 04:09:16 +08:00
|
|
|
._M_sequence(*this, "this")
|
|
|
|
._M_integer(__pos, "__pos")
|
|
|
|
._M_integer(this->size(), "size"));
|
|
|
|
return _M_base()[__pos];
|
|
|
|
}
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
reference
|
re PR libstdc++/58338 (Add noexcept to functions with a narrow contract)
2013-09-24 Marc Glisse <marc.glisse@inria.fr>
PR libstdc++/58338
PR libstdc++/56166
* include/bits/basic_string.h (basic_string)
[basic_string(basic_string&&)]: Make the noexcept conditional.
[operator=(basic_string&&), assign(basic_string&&)]: Link to PR 58265.
[begin(), end(), rbegin(), rend(), clear]: Remove noexcept.
[pop_back]: Comment on the lack of noexcept.
* include/debug/string (basic_string) [basic_string(const _Allocator&),
basic_string(basic_string&&), begin(), end(), rbegin(), rend(), clear,
operator[](size_type), pop_back]: Comment out noexcept, until vstring
replaces basic_string.
From-SVN: r202861
2013-09-24 18:07:32 +08:00
|
|
|
operator[](size_type __pos) // _GLIBCXX_NOEXCEPT
|
2003-11-12 04:09:16 +08:00
|
|
|
{
|
2015-09-11 19:02:14 +08:00
|
|
|
#if __cplusplus < 201103L && defined(_GLIBCXX_DEBUG_PEDANTIC)
|
2003-11-12 04:09:16 +08:00
|
|
|
__glibcxx_check_subscript(__pos);
|
2005-05-24 18:58:22 +08:00
|
|
|
#else
|
|
|
|
// as an extension v3 allows s[s.size()] when s is non-const.
|
|
|
|
_GLIBCXX_DEBUG_VERIFY(__pos <= this->size(),
|
2005-12-19 08:56:05 +08:00
|
|
|
_M_message(__gnu_debug::__msg_subscript_oob)
|
2005-05-24 18:58:22 +08:00
|
|
|
._M_sequence(*this, "this")
|
|
|
|
._M_integer(__pos, "__pos")
|
|
|
|
._M_integer(this->size(), "size"));
|
|
|
|
#endif
|
2003-11-12 04:09:16 +08:00
|
|
|
return _M_base()[__pos];
|
|
|
|
}
|
|
|
|
|
|
|
|
using _Base::at;
|
|
|
|
|
2012-11-11 01:27:22 +08:00
|
|
|
#if __cplusplus >= 201103L
|
2010-05-31 22:14:42 +08:00
|
|
|
using _Base::front;
|
|
|
|
using _Base::back;
|
|
|
|
#endif
|
|
|
|
|
2003-11-12 04:09:16 +08:00
|
|
|
// 21.3.5 modifiers:
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
basic_string&
|
2003-11-12 04:09:16 +08:00
|
|
|
operator+=(const basic_string& __str)
|
|
|
|
{
|
|
|
|
_M_base() += __str;
|
|
|
|
this->_M_invalidate_all();
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
basic_string&
|
2003-11-12 04:09:16 +08:00
|
|
|
operator+=(const _CharT* __s)
|
|
|
|
{
|
|
|
|
__glibcxx_check_string(__s);
|
|
|
|
_M_base() += __s;
|
|
|
|
this->_M_invalidate_all();
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
basic_string&
|
2003-11-12 04:09:16 +08:00
|
|
|
operator+=(_CharT __c)
|
|
|
|
{
|
|
|
|
_M_base() += __c;
|
|
|
|
this->_M_invalidate_all();
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2012-11-11 01:27:22 +08:00
|
|
|
#if __cplusplus >= 201103L
|
2008-07-22 03:40:39 +08:00
|
|
|
basic_string&
|
2010-01-11 00:15:58 +08:00
|
|
|
operator+=(std::initializer_list<_CharT> __l)
|
2008-07-22 03:40:39 +08:00
|
|
|
{
|
|
|
|
_M_base() += __l;
|
|
|
|
this->_M_invalidate_all();
|
|
|
|
return *this;
|
|
|
|
}
|
2012-11-11 01:27:22 +08:00
|
|
|
#endif // C++11
|
2008-07-22 03:40:39 +08:00
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
basic_string&
|
2003-11-12 04:09:16 +08:00
|
|
|
append(const basic_string& __str)
|
|
|
|
{
|
|
|
|
_Base::append(__str);
|
|
|
|
this->_M_invalidate_all();
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
basic_string&
|
2003-11-12 04:09:16 +08:00
|
|
|
append(const basic_string& __str, size_type __pos, size_type __n)
|
|
|
|
{
|
|
|
|
_Base::append(__str, __pos, __n);
|
|
|
|
this->_M_invalidate_all();
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
basic_string&
|
2003-11-12 04:09:16 +08:00
|
|
|
append(const _CharT* __s, size_type __n)
|
|
|
|
{
|
|
|
|
__glibcxx_check_string_len(__s, __n);
|
|
|
|
_Base::append(__s, __n);
|
|
|
|
this->_M_invalidate_all();
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
basic_string&
|
2003-11-12 04:09:16 +08:00
|
|
|
append(const _CharT* __s)
|
|
|
|
{
|
|
|
|
__glibcxx_check_string(__s);
|
|
|
|
_Base::append(__s);
|
|
|
|
this->_M_invalidate_all();
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
basic_string&
|
2003-11-12 04:09:16 +08:00
|
|
|
append(size_type __n, _CharT __c)
|
|
|
|
{
|
|
|
|
_Base::append(__n, __c);
|
|
|
|
this->_M_invalidate_all();
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
template<typename _InputIterator>
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
basic_string&
|
2003-11-12 04:09:16 +08:00
|
|
|
append(_InputIterator __first, _InputIterator __last)
|
|
|
|
{
|
stl_iterator_base_types.h (_Iter_base): Limit definition to pre-C++11 mode.
2015-06-29 François Dumont <fdumont@gcc.gnu.org>
* include/bits/stl_iterator_base_types.h (_Iter_base): Limit definition
to pre-C++11 mode.
* include/debug/functions.h
(__gnu_debug::__valid_range, __gnu_debug::__base): Move...
* include/debug/safe_iterator.h
(__gnu_debug::_Sequence_traits): New.
(__gnu_debug::__get_distance_from_begin): New.
(__gnu_debug::__get_distance_to_end): New.
(__gnu_debug::_Safe_iterator<>::_M_valid_range): Expose iterator range
distance information. Add optional check_dereferenceable parameter,
default true.
(__gnu_debug::_Distance_precision, __gnu_debug::__get_distance): Move
default definition...
(__gnu_debug::__get_distance): New overload for _Safe_iterator.
(__gnu_debug::__unsafe): Likewise.
* include/debug/helper_functions.h: ...here. New.
(__gnu_debug::__unsafe): New helper function to remove safe iterator
layer.
* include/debug/stl_iterator.h: New. Include latter.
* include/bits/stl_iterator.h: Include latter in debug mode.
* include/debug/stl_iterator.tcc: Adapt.
* include/debug/safe_local_iterator.h (__gnu_debug::__get_distance): Add
overload for _Safe_local_iterator.
(__gnu_debug::__unsafe): Likewise.
* include/debug/safe_local_iterator.tcc: Adapt.
* include/debug/macros.h (__glibcxx_check_valid_range2): New.
(__glibcxx_check_insert_range): Add _Dist parameter.
(__glibcxx_check_insert_range_after): Likewise.
(__glibcxx_check_string, __glibcxx_check_string_len): Implement using
_GLIBCXX_DEBUG_PEDASSERT.
* include/debug/deque (deque<>::assign): Remove iterator debug layer
when possible.
(deque<>::insert): Likewise.
* include/debug/forward_list (__glibcxx_check_valid_fl_range): New.
(forward_list<>::splice_after): Use latter.
(forward_list<>::assign): Remove iterator debug layer when possible.
(forward_list<>::insert_after): Likewise.
(__gnu_debug::_Sequence_traits<>): Partial specialization.
* include/debug/list (list<>::assign): Remove iterator debug layer when
possible.
(list<>::insert): Likewise.
[__gnu_debug::_Sequence_traits<>]: Partial specialization pre C++11 ABI.
* include/debug/map.h (map<>::insert): Remove iterator debug layer when
possible.
* include/debug/multimap.h (multimap<>::insert): Likewise.
* include/debug/set.h (set<>::insert): Likewise.
* include/debug/multiset.h (multiset<>::insert): Likewise.
* include/debug/string (basic_string<>::append, basic_string<>::assign,
basic_string<>::insert, basic_string<>::replace): Likewise.
* include/debug/unordered_map
(unordered_map<>::insert, unordered_multimap<>::insert): Likewise.
* include/debug/unordered_set
(unordered_set<>::insert, unordered_multiset<>insert): Likewise.
* include/debug/vector
(vector<>::assign, vector<>::insert): Likewise.
* include/Makefile.am: Add new debug headers.
* include/Makefile.in: Regenerate.
From-SVN: r225143
2015-06-30 04:17:56 +08:00
|
|
|
typename __gnu_debug::_Distance_traits<_InputIterator>::__type __dist;
|
|
|
|
__glibcxx_check_valid_range2(__first, __last, __dist);
|
|
|
|
|
|
|
|
if (__dist.second >= __dp_sign)
|
|
|
|
_Base::append(__gnu_debug::__unsafe(__first),
|
|
|
|
__gnu_debug::__unsafe(__last));
|
|
|
|
else
|
|
|
|
_Base::append(__first, __last);
|
|
|
|
|
2003-11-12 04:09:16 +08:00
|
|
|
this->_M_invalidate_all();
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
// _GLIBCXX_RESOLVE_LIB_DEFECTS
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
// 7. string clause minor problems
|
|
|
|
void
|
2003-11-12 04:09:16 +08:00
|
|
|
push_back(_CharT __c)
|
|
|
|
{
|
|
|
|
_Base::push_back(__c);
|
|
|
|
this->_M_invalidate_all();
|
|
|
|
}
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
basic_string&
|
2003-11-12 04:09:16 +08:00
|
|
|
assign(const basic_string& __x)
|
|
|
|
{
|
|
|
|
_Base::assign(__x);
|
|
|
|
this->_M_invalidate_all();
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2012-11-11 01:27:22 +08:00
|
|
|
#if __cplusplus >= 201103L
|
2010-01-11 00:15:58 +08:00
|
|
|
basic_string&
|
|
|
|
assign(basic_string&& __x)
|
2015-09-11 19:02:14 +08:00
|
|
|
noexcept(noexcept(std::declval<_Base&>().assign(std::move(__x))))
|
2010-01-11 00:15:58 +08:00
|
|
|
{
|
2010-08-05 15:34:08 +08:00
|
|
|
_Base::assign(std::move(__x));
|
2010-01-11 00:15:58 +08:00
|
|
|
this->_M_invalidate_all();
|
|
|
|
return *this;
|
|
|
|
}
|
2012-11-11 01:27:22 +08:00
|
|
|
#endif // C++11
|
2010-01-11 00:15:58 +08:00
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
basic_string&
|
2003-11-12 04:09:16 +08:00
|
|
|
assign(const basic_string& __str, size_type __pos, size_type __n)
|
|
|
|
{
|
|
|
|
_Base::assign(__str, __pos, __n);
|
|
|
|
this->_M_invalidate_all();
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
basic_string&
|
2003-11-12 04:09:16 +08:00
|
|
|
assign(const _CharT* __s, size_type __n)
|
|
|
|
{
|
|
|
|
__glibcxx_check_string_len(__s, __n);
|
|
|
|
_Base::assign(__s, __n);
|
|
|
|
this->_M_invalidate_all();
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
basic_string&
|
2003-11-12 04:09:16 +08:00
|
|
|
assign(const _CharT* __s)
|
|
|
|
{
|
|
|
|
__glibcxx_check_string(__s);
|
|
|
|
_Base::assign(__s);
|
|
|
|
this->_M_invalidate_all();
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
basic_string&
|
2003-11-12 04:09:16 +08:00
|
|
|
assign(size_type __n, _CharT __c)
|
|
|
|
{
|
|
|
|
_Base::assign(__n, __c);
|
|
|
|
this->_M_invalidate_all();
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
return *this;
|
2003-11-12 04:09:16 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
template<typename _InputIterator>
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
basic_string&
|
2003-11-12 04:09:16 +08:00
|
|
|
assign(_InputIterator __first, _InputIterator __last)
|
|
|
|
{
|
stl_iterator_base_types.h (_Iter_base): Limit definition to pre-C++11 mode.
2015-06-29 François Dumont <fdumont@gcc.gnu.org>
* include/bits/stl_iterator_base_types.h (_Iter_base): Limit definition
to pre-C++11 mode.
* include/debug/functions.h
(__gnu_debug::__valid_range, __gnu_debug::__base): Move...
* include/debug/safe_iterator.h
(__gnu_debug::_Sequence_traits): New.
(__gnu_debug::__get_distance_from_begin): New.
(__gnu_debug::__get_distance_to_end): New.
(__gnu_debug::_Safe_iterator<>::_M_valid_range): Expose iterator range
distance information. Add optional check_dereferenceable parameter,
default true.
(__gnu_debug::_Distance_precision, __gnu_debug::__get_distance): Move
default definition...
(__gnu_debug::__get_distance): New overload for _Safe_iterator.
(__gnu_debug::__unsafe): Likewise.
* include/debug/helper_functions.h: ...here. New.
(__gnu_debug::__unsafe): New helper function to remove safe iterator
layer.
* include/debug/stl_iterator.h: New. Include latter.
* include/bits/stl_iterator.h: Include latter in debug mode.
* include/debug/stl_iterator.tcc: Adapt.
* include/debug/safe_local_iterator.h (__gnu_debug::__get_distance): Add
overload for _Safe_local_iterator.
(__gnu_debug::__unsafe): Likewise.
* include/debug/safe_local_iterator.tcc: Adapt.
* include/debug/macros.h (__glibcxx_check_valid_range2): New.
(__glibcxx_check_insert_range): Add _Dist parameter.
(__glibcxx_check_insert_range_after): Likewise.
(__glibcxx_check_string, __glibcxx_check_string_len): Implement using
_GLIBCXX_DEBUG_PEDASSERT.
* include/debug/deque (deque<>::assign): Remove iterator debug layer
when possible.
(deque<>::insert): Likewise.
* include/debug/forward_list (__glibcxx_check_valid_fl_range): New.
(forward_list<>::splice_after): Use latter.
(forward_list<>::assign): Remove iterator debug layer when possible.
(forward_list<>::insert_after): Likewise.
(__gnu_debug::_Sequence_traits<>): Partial specialization.
* include/debug/list (list<>::assign): Remove iterator debug layer when
possible.
(list<>::insert): Likewise.
[__gnu_debug::_Sequence_traits<>]: Partial specialization pre C++11 ABI.
* include/debug/map.h (map<>::insert): Remove iterator debug layer when
possible.
* include/debug/multimap.h (multimap<>::insert): Likewise.
* include/debug/set.h (set<>::insert): Likewise.
* include/debug/multiset.h (multiset<>::insert): Likewise.
* include/debug/string (basic_string<>::append, basic_string<>::assign,
basic_string<>::insert, basic_string<>::replace): Likewise.
* include/debug/unordered_map
(unordered_map<>::insert, unordered_multimap<>::insert): Likewise.
* include/debug/unordered_set
(unordered_set<>::insert, unordered_multiset<>insert): Likewise.
* include/debug/vector
(vector<>::assign, vector<>::insert): Likewise.
* include/Makefile.am: Add new debug headers.
* include/Makefile.in: Regenerate.
From-SVN: r225143
2015-06-30 04:17:56 +08:00
|
|
|
typename __gnu_debug::_Distance_traits<_InputIterator>::__type __dist;
|
|
|
|
__glibcxx_check_valid_range2(__first, __last, __dist);
|
|
|
|
|
|
|
|
if (__dist.second >= __dp_sign)
|
|
|
|
_Base::assign(__gnu_debug::__unsafe(__first),
|
|
|
|
__gnu_debug::__unsafe(__last));
|
|
|
|
else
|
|
|
|
_Base::assign(__first, __last);
|
|
|
|
|
2003-11-12 04:09:16 +08:00
|
|
|
this->_M_invalidate_all();
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
return *this;
|
2003-11-12 04:09:16 +08:00
|
|
|
}
|
|
|
|
|
2012-11-11 01:27:22 +08:00
|
|
|
#if __cplusplus >= 201103L
|
2008-07-22 03:40:39 +08:00
|
|
|
basic_string&
|
2010-01-11 00:15:58 +08:00
|
|
|
assign(std::initializer_list<_CharT> __l)
|
2008-07-22 03:40:39 +08:00
|
|
|
{
|
|
|
|
_Base::assign(__l);
|
|
|
|
this->_M_invalidate_all();
|
|
|
|
return *this;
|
|
|
|
}
|
2012-11-11 01:27:22 +08:00
|
|
|
#endif // C++11
|
2008-07-22 03:40:39 +08:00
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
basic_string&
|
2003-11-12 04:09:16 +08:00
|
|
|
insert(size_type __pos1, const basic_string& __str)
|
|
|
|
{
|
|
|
|
_Base::insert(__pos1, __str);
|
|
|
|
this->_M_invalidate_all();
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
basic_string&
|
2003-11-12 04:09:16 +08:00
|
|
|
insert(size_type __pos1, const basic_string& __str,
|
|
|
|
size_type __pos2, size_type __n)
|
|
|
|
{
|
|
|
|
_Base::insert(__pos1, __str, __pos2, __n);
|
|
|
|
this->_M_invalidate_all();
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
basic_string&
|
2003-11-12 04:09:16 +08:00
|
|
|
insert(size_type __pos, const _CharT* __s, size_type __n)
|
|
|
|
{
|
|
|
|
__glibcxx_check_string(__s);
|
|
|
|
_Base::insert(__pos, __s, __n);
|
|
|
|
this->_M_invalidate_all();
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
basic_string&
|
2003-11-12 04:09:16 +08:00
|
|
|
insert(size_type __pos, const _CharT* __s)
|
|
|
|
{
|
|
|
|
__glibcxx_check_string(__s);
|
|
|
|
_Base::insert(__pos, __s);
|
|
|
|
this->_M_invalidate_all();
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
return *this;
|
2003-11-12 04:09:16 +08:00
|
|
|
}
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
basic_string&
|
2003-11-12 04:09:16 +08:00
|
|
|
insert(size_type __pos, size_type __n, _CharT __c)
|
|
|
|
{
|
|
|
|
_Base::insert(__pos, __n, __c);
|
|
|
|
this->_M_invalidate_all();
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
iterator
|
PR libstdc++/83328 add correct basic_string::insert for initializer_list
The SSO basic_string has a non-standard insert(iterator, initializer_list)
overload, from a C++0x draft. This adds the correct overload, while also
preserving the old one so that the old symbol is still exported from the
library.
The COW basic_string doesn't have any of the C++11 changes to the insert
overloads (they all still have non-const iterator parameters and the
ones that should return an iterator still return void). This doesn't
make any change to the COW string.
PR libstdc++/83328
* acinclude.m4 (libtool_VERSION): Bump to 6:26:0.
* config/abi/pre/gnu.ver: Add GLIBCXX_3.4.26 and export new symbol.
* configure: Regenerate.
* include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
(basic_string::insert(const_iterator, initializer_list<C>)): Add.
[_GLIBCXX_USE_CXX11_ABI && !_GLIBCXX_DEFINING_STRING_INSTANTIATIONS]
(basic_string::insert(iterator, initializer_list<C>)): Suppress
definition.
* include/debug/string (basic_string::insert(iterator, C)): Change
first parameter to const_iterator.
(basic_string::insert(iterator, size_type, C)): Likewise. Change
return type to iterator.
(basic_string::insert(iterator, InputIterator, InputIterator)):
Likewise.
(basic_string::insert(iterator, initializer_list<C>)): Change first
parameter to const_iterator and return type to iterator.
* src/c++11/string-inst.cc: Extend comment.
* testsuite/21_strings/basic_string/modifiers/insert/char/83328.cc:
New.
* testsuite/21_strings/basic_string/modifiers/insert/wchar_t/83328.cc:
New.
* testsuite/util/testsuite_abi.cc: Add new symbol version.
From-SVN: r261866
2018-06-22 06:01:25 +08:00
|
|
|
insert(const_iterator __p, _CharT __c)
|
2003-11-12 04:09:16 +08:00
|
|
|
{
|
|
|
|
__glibcxx_check_insert(__p);
|
|
|
|
typename _Base::iterator __res = _Base::insert(__p.base(), __c);
|
|
|
|
this->_M_invalidate_all();
|
|
|
|
return iterator(__res, this);
|
|
|
|
}
|
|
|
|
|
PR libstdc++/83328 add correct basic_string::insert for initializer_list
The SSO basic_string has a non-standard insert(iterator, initializer_list)
overload, from a C++0x draft. This adds the correct overload, while also
preserving the old one so that the old symbol is still exported from the
library.
The COW basic_string doesn't have any of the C++11 changes to the insert
overloads (they all still have non-const iterator parameters and the
ones that should return an iterator still return void). This doesn't
make any change to the COW string.
PR libstdc++/83328
* acinclude.m4 (libtool_VERSION): Bump to 6:26:0.
* config/abi/pre/gnu.ver: Add GLIBCXX_3.4.26 and export new symbol.
* configure: Regenerate.
* include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
(basic_string::insert(const_iterator, initializer_list<C>)): Add.
[_GLIBCXX_USE_CXX11_ABI && !_GLIBCXX_DEFINING_STRING_INSTANTIATIONS]
(basic_string::insert(iterator, initializer_list<C>)): Suppress
definition.
* include/debug/string (basic_string::insert(iterator, C)): Change
first parameter to const_iterator.
(basic_string::insert(iterator, size_type, C)): Likewise. Change
return type to iterator.
(basic_string::insert(iterator, InputIterator, InputIterator)):
Likewise.
(basic_string::insert(iterator, initializer_list<C>)): Change first
parameter to const_iterator and return type to iterator.
* src/c++11/string-inst.cc: Extend comment.
* testsuite/21_strings/basic_string/modifiers/insert/char/83328.cc:
New.
* testsuite/21_strings/basic_string/modifiers/insert/wchar_t/83328.cc:
New.
* testsuite/util/testsuite_abi.cc: Add new symbol version.
From-SVN: r261866
2018-06-22 06:01:25 +08:00
|
|
|
iterator
|
|
|
|
insert(const_iterator __p, size_type __n, _CharT __c)
|
2003-11-12 04:09:16 +08:00
|
|
|
{
|
|
|
|
__glibcxx_check_insert(__p);
|
PR libstdc++/83328 add correct basic_string::insert for initializer_list
The SSO basic_string has a non-standard insert(iterator, initializer_list)
overload, from a C++0x draft. This adds the correct overload, while also
preserving the old one so that the old symbol is still exported from the
library.
The COW basic_string doesn't have any of the C++11 changes to the insert
overloads (they all still have non-const iterator parameters and the
ones that should return an iterator still return void). This doesn't
make any change to the COW string.
PR libstdc++/83328
* acinclude.m4 (libtool_VERSION): Bump to 6:26:0.
* config/abi/pre/gnu.ver: Add GLIBCXX_3.4.26 and export new symbol.
* configure: Regenerate.
* include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
(basic_string::insert(const_iterator, initializer_list<C>)): Add.
[_GLIBCXX_USE_CXX11_ABI && !_GLIBCXX_DEFINING_STRING_INSTANTIATIONS]
(basic_string::insert(iterator, initializer_list<C>)): Suppress
definition.
* include/debug/string (basic_string::insert(iterator, C)): Change
first parameter to const_iterator.
(basic_string::insert(iterator, size_type, C)): Likewise. Change
return type to iterator.
(basic_string::insert(iterator, InputIterator, InputIterator)):
Likewise.
(basic_string::insert(iterator, initializer_list<C>)): Change first
parameter to const_iterator and return type to iterator.
* src/c++11/string-inst.cc: Extend comment.
* testsuite/21_strings/basic_string/modifiers/insert/char/83328.cc:
New.
* testsuite/21_strings/basic_string/modifiers/insert/wchar_t/83328.cc:
New.
* testsuite/util/testsuite_abi.cc: Add new symbol version.
From-SVN: r261866
2018-06-22 06:01:25 +08:00
|
|
|
typename _Base::iterator __res = _Base::insert(__p.base(), __n, __c);
|
2003-11-12 04:09:16 +08:00
|
|
|
this->_M_invalidate_all();
|
PR libstdc++/83328 add correct basic_string::insert for initializer_list
The SSO basic_string has a non-standard insert(iterator, initializer_list)
overload, from a C++0x draft. This adds the correct overload, while also
preserving the old one so that the old symbol is still exported from the
library.
The COW basic_string doesn't have any of the C++11 changes to the insert
overloads (they all still have non-const iterator parameters and the
ones that should return an iterator still return void). This doesn't
make any change to the COW string.
PR libstdc++/83328
* acinclude.m4 (libtool_VERSION): Bump to 6:26:0.
* config/abi/pre/gnu.ver: Add GLIBCXX_3.4.26 and export new symbol.
* configure: Regenerate.
* include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
(basic_string::insert(const_iterator, initializer_list<C>)): Add.
[_GLIBCXX_USE_CXX11_ABI && !_GLIBCXX_DEFINING_STRING_INSTANTIATIONS]
(basic_string::insert(iterator, initializer_list<C>)): Suppress
definition.
* include/debug/string (basic_string::insert(iterator, C)): Change
first parameter to const_iterator.
(basic_string::insert(iterator, size_type, C)): Likewise. Change
return type to iterator.
(basic_string::insert(iterator, InputIterator, InputIterator)):
Likewise.
(basic_string::insert(iterator, initializer_list<C>)): Change first
parameter to const_iterator and return type to iterator.
* src/c++11/string-inst.cc: Extend comment.
* testsuite/21_strings/basic_string/modifiers/insert/char/83328.cc:
New.
* testsuite/21_strings/basic_string/modifiers/insert/wchar_t/83328.cc:
New.
* testsuite/util/testsuite_abi.cc: Add new symbol version.
From-SVN: r261866
2018-06-22 06:01:25 +08:00
|
|
|
return iterator(__res, this);
|
2003-11-12 04:09:16 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
template<typename _InputIterator>
|
PR libstdc++/83328 add correct basic_string::insert for initializer_list
The SSO basic_string has a non-standard insert(iterator, initializer_list)
overload, from a C++0x draft. This adds the correct overload, while also
preserving the old one so that the old symbol is still exported from the
library.
The COW basic_string doesn't have any of the C++11 changes to the insert
overloads (they all still have non-const iterator parameters and the
ones that should return an iterator still return void). This doesn't
make any change to the COW string.
PR libstdc++/83328
* acinclude.m4 (libtool_VERSION): Bump to 6:26:0.
* config/abi/pre/gnu.ver: Add GLIBCXX_3.4.26 and export new symbol.
* configure: Regenerate.
* include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
(basic_string::insert(const_iterator, initializer_list<C>)): Add.
[_GLIBCXX_USE_CXX11_ABI && !_GLIBCXX_DEFINING_STRING_INSTANTIATIONS]
(basic_string::insert(iterator, initializer_list<C>)): Suppress
definition.
* include/debug/string (basic_string::insert(iterator, C)): Change
first parameter to const_iterator.
(basic_string::insert(iterator, size_type, C)): Likewise. Change
return type to iterator.
(basic_string::insert(iterator, InputIterator, InputIterator)):
Likewise.
(basic_string::insert(iterator, initializer_list<C>)): Change first
parameter to const_iterator and return type to iterator.
* src/c++11/string-inst.cc: Extend comment.
* testsuite/21_strings/basic_string/modifiers/insert/char/83328.cc:
New.
* testsuite/21_strings/basic_string/modifiers/insert/wchar_t/83328.cc:
New.
* testsuite/util/testsuite_abi.cc: Add new symbol version.
From-SVN: r261866
2018-06-22 06:01:25 +08:00
|
|
|
iterator
|
|
|
|
insert(const_iterator __p, _InputIterator __first, _InputIterator __last)
|
2003-11-12 04:09:16 +08:00
|
|
|
{
|
stl_iterator_base_types.h (_Iter_base): Limit definition to pre-C++11 mode.
2015-06-29 François Dumont <fdumont@gcc.gnu.org>
* include/bits/stl_iterator_base_types.h (_Iter_base): Limit definition
to pre-C++11 mode.
* include/debug/functions.h
(__gnu_debug::__valid_range, __gnu_debug::__base): Move...
* include/debug/safe_iterator.h
(__gnu_debug::_Sequence_traits): New.
(__gnu_debug::__get_distance_from_begin): New.
(__gnu_debug::__get_distance_to_end): New.
(__gnu_debug::_Safe_iterator<>::_M_valid_range): Expose iterator range
distance information. Add optional check_dereferenceable parameter,
default true.
(__gnu_debug::_Distance_precision, __gnu_debug::__get_distance): Move
default definition...
(__gnu_debug::__get_distance): New overload for _Safe_iterator.
(__gnu_debug::__unsafe): Likewise.
* include/debug/helper_functions.h: ...here. New.
(__gnu_debug::__unsafe): New helper function to remove safe iterator
layer.
* include/debug/stl_iterator.h: New. Include latter.
* include/bits/stl_iterator.h: Include latter in debug mode.
* include/debug/stl_iterator.tcc: Adapt.
* include/debug/safe_local_iterator.h (__gnu_debug::__get_distance): Add
overload for _Safe_local_iterator.
(__gnu_debug::__unsafe): Likewise.
* include/debug/safe_local_iterator.tcc: Adapt.
* include/debug/macros.h (__glibcxx_check_valid_range2): New.
(__glibcxx_check_insert_range): Add _Dist parameter.
(__glibcxx_check_insert_range_after): Likewise.
(__glibcxx_check_string, __glibcxx_check_string_len): Implement using
_GLIBCXX_DEBUG_PEDASSERT.
* include/debug/deque (deque<>::assign): Remove iterator debug layer
when possible.
(deque<>::insert): Likewise.
* include/debug/forward_list (__glibcxx_check_valid_fl_range): New.
(forward_list<>::splice_after): Use latter.
(forward_list<>::assign): Remove iterator debug layer when possible.
(forward_list<>::insert_after): Likewise.
(__gnu_debug::_Sequence_traits<>): Partial specialization.
* include/debug/list (list<>::assign): Remove iterator debug layer when
possible.
(list<>::insert): Likewise.
[__gnu_debug::_Sequence_traits<>]: Partial specialization pre C++11 ABI.
* include/debug/map.h (map<>::insert): Remove iterator debug layer when
possible.
* include/debug/multimap.h (multimap<>::insert): Likewise.
* include/debug/set.h (set<>::insert): Likewise.
* include/debug/multiset.h (multiset<>::insert): Likewise.
* include/debug/string (basic_string<>::append, basic_string<>::assign,
basic_string<>::insert, basic_string<>::replace): Likewise.
* include/debug/unordered_map
(unordered_map<>::insert, unordered_multimap<>::insert): Likewise.
* include/debug/unordered_set
(unordered_set<>::insert, unordered_multiset<>insert): Likewise.
* include/debug/vector
(vector<>::assign, vector<>::insert): Likewise.
* include/Makefile.am: Add new debug headers.
* include/Makefile.in: Regenerate.
From-SVN: r225143
2015-06-30 04:17:56 +08:00
|
|
|
typename __gnu_debug::_Distance_traits<_InputIterator>::__type __dist;
|
|
|
|
__glibcxx_check_insert_range2(__p, __first, __last, __dist);
|
|
|
|
|
PR libstdc++/83328 add correct basic_string::insert for initializer_list
The SSO basic_string has a non-standard insert(iterator, initializer_list)
overload, from a C++0x draft. This adds the correct overload, while also
preserving the old one so that the old symbol is still exported from the
library.
The COW basic_string doesn't have any of the C++11 changes to the insert
overloads (they all still have non-const iterator parameters and the
ones that should return an iterator still return void). This doesn't
make any change to the COW string.
PR libstdc++/83328
* acinclude.m4 (libtool_VERSION): Bump to 6:26:0.
* config/abi/pre/gnu.ver: Add GLIBCXX_3.4.26 and export new symbol.
* configure: Regenerate.
* include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
(basic_string::insert(const_iterator, initializer_list<C>)): Add.
[_GLIBCXX_USE_CXX11_ABI && !_GLIBCXX_DEFINING_STRING_INSTANTIATIONS]
(basic_string::insert(iterator, initializer_list<C>)): Suppress
definition.
* include/debug/string (basic_string::insert(iterator, C)): Change
first parameter to const_iterator.
(basic_string::insert(iterator, size_type, C)): Likewise. Change
return type to iterator.
(basic_string::insert(iterator, InputIterator, InputIterator)):
Likewise.
(basic_string::insert(iterator, initializer_list<C>)): Change first
parameter to const_iterator and return type to iterator.
* src/c++11/string-inst.cc: Extend comment.
* testsuite/21_strings/basic_string/modifiers/insert/char/83328.cc:
New.
* testsuite/21_strings/basic_string/modifiers/insert/wchar_t/83328.cc:
New.
* testsuite/util/testsuite_abi.cc: Add new symbol version.
From-SVN: r261866
2018-06-22 06:01:25 +08:00
|
|
|
typename _Base::iterator __res;
|
stl_iterator_base_types.h (_Iter_base): Limit definition to pre-C++11 mode.
2015-06-29 François Dumont <fdumont@gcc.gnu.org>
* include/bits/stl_iterator_base_types.h (_Iter_base): Limit definition
to pre-C++11 mode.
* include/debug/functions.h
(__gnu_debug::__valid_range, __gnu_debug::__base): Move...
* include/debug/safe_iterator.h
(__gnu_debug::_Sequence_traits): New.
(__gnu_debug::__get_distance_from_begin): New.
(__gnu_debug::__get_distance_to_end): New.
(__gnu_debug::_Safe_iterator<>::_M_valid_range): Expose iterator range
distance information. Add optional check_dereferenceable parameter,
default true.
(__gnu_debug::_Distance_precision, __gnu_debug::__get_distance): Move
default definition...
(__gnu_debug::__get_distance): New overload for _Safe_iterator.
(__gnu_debug::__unsafe): Likewise.
* include/debug/helper_functions.h: ...here. New.
(__gnu_debug::__unsafe): New helper function to remove safe iterator
layer.
* include/debug/stl_iterator.h: New. Include latter.
* include/bits/stl_iterator.h: Include latter in debug mode.
* include/debug/stl_iterator.tcc: Adapt.
* include/debug/safe_local_iterator.h (__gnu_debug::__get_distance): Add
overload for _Safe_local_iterator.
(__gnu_debug::__unsafe): Likewise.
* include/debug/safe_local_iterator.tcc: Adapt.
* include/debug/macros.h (__glibcxx_check_valid_range2): New.
(__glibcxx_check_insert_range): Add _Dist parameter.
(__glibcxx_check_insert_range_after): Likewise.
(__glibcxx_check_string, __glibcxx_check_string_len): Implement using
_GLIBCXX_DEBUG_PEDASSERT.
* include/debug/deque (deque<>::assign): Remove iterator debug layer
when possible.
(deque<>::insert): Likewise.
* include/debug/forward_list (__glibcxx_check_valid_fl_range): New.
(forward_list<>::splice_after): Use latter.
(forward_list<>::assign): Remove iterator debug layer when possible.
(forward_list<>::insert_after): Likewise.
(__gnu_debug::_Sequence_traits<>): Partial specialization.
* include/debug/list (list<>::assign): Remove iterator debug layer when
possible.
(list<>::insert): Likewise.
[__gnu_debug::_Sequence_traits<>]: Partial specialization pre C++11 ABI.
* include/debug/map.h (map<>::insert): Remove iterator debug layer when
possible.
* include/debug/multimap.h (multimap<>::insert): Likewise.
* include/debug/set.h (set<>::insert): Likewise.
* include/debug/multiset.h (multiset<>::insert): Likewise.
* include/debug/string (basic_string<>::append, basic_string<>::assign,
basic_string<>::insert, basic_string<>::replace): Likewise.
* include/debug/unordered_map
(unordered_map<>::insert, unordered_multimap<>::insert): Likewise.
* include/debug/unordered_set
(unordered_set<>::insert, unordered_multiset<>insert): Likewise.
* include/debug/vector
(vector<>::assign, vector<>::insert): Likewise.
* include/Makefile.am: Add new debug headers.
* include/Makefile.in: Regenerate.
From-SVN: r225143
2015-06-30 04:17:56 +08:00
|
|
|
if (__dist.second >= __dp_sign)
|
PR libstdc++/83328 add correct basic_string::insert for initializer_list
The SSO basic_string has a non-standard insert(iterator, initializer_list)
overload, from a C++0x draft. This adds the correct overload, while also
preserving the old one so that the old symbol is still exported from the
library.
The COW basic_string doesn't have any of the C++11 changes to the insert
overloads (they all still have non-const iterator parameters and the
ones that should return an iterator still return void). This doesn't
make any change to the COW string.
PR libstdc++/83328
* acinclude.m4 (libtool_VERSION): Bump to 6:26:0.
* config/abi/pre/gnu.ver: Add GLIBCXX_3.4.26 and export new symbol.
* configure: Regenerate.
* include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
(basic_string::insert(const_iterator, initializer_list<C>)): Add.
[_GLIBCXX_USE_CXX11_ABI && !_GLIBCXX_DEFINING_STRING_INSTANTIATIONS]
(basic_string::insert(iterator, initializer_list<C>)): Suppress
definition.
* include/debug/string (basic_string::insert(iterator, C)): Change
first parameter to const_iterator.
(basic_string::insert(iterator, size_type, C)): Likewise. Change
return type to iterator.
(basic_string::insert(iterator, InputIterator, InputIterator)):
Likewise.
(basic_string::insert(iterator, initializer_list<C>)): Change first
parameter to const_iterator and return type to iterator.
* src/c++11/string-inst.cc: Extend comment.
* testsuite/21_strings/basic_string/modifiers/insert/char/83328.cc:
New.
* testsuite/21_strings/basic_string/modifiers/insert/wchar_t/83328.cc:
New.
* testsuite/util/testsuite_abi.cc: Add new symbol version.
From-SVN: r261866
2018-06-22 06:01:25 +08:00
|
|
|
__res = _Base::insert(__p.base(), __gnu_debug::__unsafe(__first),
|
|
|
|
__gnu_debug::__unsafe(__last));
|
stl_iterator_base_types.h (_Iter_base): Limit definition to pre-C++11 mode.
2015-06-29 François Dumont <fdumont@gcc.gnu.org>
* include/bits/stl_iterator_base_types.h (_Iter_base): Limit definition
to pre-C++11 mode.
* include/debug/functions.h
(__gnu_debug::__valid_range, __gnu_debug::__base): Move...
* include/debug/safe_iterator.h
(__gnu_debug::_Sequence_traits): New.
(__gnu_debug::__get_distance_from_begin): New.
(__gnu_debug::__get_distance_to_end): New.
(__gnu_debug::_Safe_iterator<>::_M_valid_range): Expose iterator range
distance information. Add optional check_dereferenceable parameter,
default true.
(__gnu_debug::_Distance_precision, __gnu_debug::__get_distance): Move
default definition...
(__gnu_debug::__get_distance): New overload for _Safe_iterator.
(__gnu_debug::__unsafe): Likewise.
* include/debug/helper_functions.h: ...here. New.
(__gnu_debug::__unsafe): New helper function to remove safe iterator
layer.
* include/debug/stl_iterator.h: New. Include latter.
* include/bits/stl_iterator.h: Include latter in debug mode.
* include/debug/stl_iterator.tcc: Adapt.
* include/debug/safe_local_iterator.h (__gnu_debug::__get_distance): Add
overload for _Safe_local_iterator.
(__gnu_debug::__unsafe): Likewise.
* include/debug/safe_local_iterator.tcc: Adapt.
* include/debug/macros.h (__glibcxx_check_valid_range2): New.
(__glibcxx_check_insert_range): Add _Dist parameter.
(__glibcxx_check_insert_range_after): Likewise.
(__glibcxx_check_string, __glibcxx_check_string_len): Implement using
_GLIBCXX_DEBUG_PEDASSERT.
* include/debug/deque (deque<>::assign): Remove iterator debug layer
when possible.
(deque<>::insert): Likewise.
* include/debug/forward_list (__glibcxx_check_valid_fl_range): New.
(forward_list<>::splice_after): Use latter.
(forward_list<>::assign): Remove iterator debug layer when possible.
(forward_list<>::insert_after): Likewise.
(__gnu_debug::_Sequence_traits<>): Partial specialization.
* include/debug/list (list<>::assign): Remove iterator debug layer when
possible.
(list<>::insert): Likewise.
[__gnu_debug::_Sequence_traits<>]: Partial specialization pre C++11 ABI.
* include/debug/map.h (map<>::insert): Remove iterator debug layer when
possible.
* include/debug/multimap.h (multimap<>::insert): Likewise.
* include/debug/set.h (set<>::insert): Likewise.
* include/debug/multiset.h (multiset<>::insert): Likewise.
* include/debug/string (basic_string<>::append, basic_string<>::assign,
basic_string<>::insert, basic_string<>::replace): Likewise.
* include/debug/unordered_map
(unordered_map<>::insert, unordered_multimap<>::insert): Likewise.
* include/debug/unordered_set
(unordered_set<>::insert, unordered_multiset<>insert): Likewise.
* include/debug/vector
(vector<>::assign, vector<>::insert): Likewise.
* include/Makefile.am: Add new debug headers.
* include/Makefile.in: Regenerate.
From-SVN: r225143
2015-06-30 04:17:56 +08:00
|
|
|
else
|
PR libstdc++/83328 add correct basic_string::insert for initializer_list
The SSO basic_string has a non-standard insert(iterator, initializer_list)
overload, from a C++0x draft. This adds the correct overload, while also
preserving the old one so that the old symbol is still exported from the
library.
The COW basic_string doesn't have any of the C++11 changes to the insert
overloads (they all still have non-const iterator parameters and the
ones that should return an iterator still return void). This doesn't
make any change to the COW string.
PR libstdc++/83328
* acinclude.m4 (libtool_VERSION): Bump to 6:26:0.
* config/abi/pre/gnu.ver: Add GLIBCXX_3.4.26 and export new symbol.
* configure: Regenerate.
* include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
(basic_string::insert(const_iterator, initializer_list<C>)): Add.
[_GLIBCXX_USE_CXX11_ABI && !_GLIBCXX_DEFINING_STRING_INSTANTIATIONS]
(basic_string::insert(iterator, initializer_list<C>)): Suppress
definition.
* include/debug/string (basic_string::insert(iterator, C)): Change
first parameter to const_iterator.
(basic_string::insert(iterator, size_type, C)): Likewise. Change
return type to iterator.
(basic_string::insert(iterator, InputIterator, InputIterator)):
Likewise.
(basic_string::insert(iterator, initializer_list<C>)): Change first
parameter to const_iterator and return type to iterator.
* src/c++11/string-inst.cc: Extend comment.
* testsuite/21_strings/basic_string/modifiers/insert/char/83328.cc:
New.
* testsuite/21_strings/basic_string/modifiers/insert/wchar_t/83328.cc:
New.
* testsuite/util/testsuite_abi.cc: Add new symbol version.
From-SVN: r261866
2018-06-22 06:01:25 +08:00
|
|
|
__res = _Base::insert(__p.base(), __first, __last);
|
2003-11-12 04:09:16 +08:00
|
|
|
this->_M_invalidate_all();
|
PR libstdc++/83328 add correct basic_string::insert for initializer_list
The SSO basic_string has a non-standard insert(iterator, initializer_list)
overload, from a C++0x draft. This adds the correct overload, while also
preserving the old one so that the old symbol is still exported from the
library.
The COW basic_string doesn't have any of the C++11 changes to the insert
overloads (they all still have non-const iterator parameters and the
ones that should return an iterator still return void). This doesn't
make any change to the COW string.
PR libstdc++/83328
* acinclude.m4 (libtool_VERSION): Bump to 6:26:0.
* config/abi/pre/gnu.ver: Add GLIBCXX_3.4.26 and export new symbol.
* configure: Regenerate.
* include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
(basic_string::insert(const_iterator, initializer_list<C>)): Add.
[_GLIBCXX_USE_CXX11_ABI && !_GLIBCXX_DEFINING_STRING_INSTANTIATIONS]
(basic_string::insert(iterator, initializer_list<C>)): Suppress
definition.
* include/debug/string (basic_string::insert(iterator, C)): Change
first parameter to const_iterator.
(basic_string::insert(iterator, size_type, C)): Likewise. Change
return type to iterator.
(basic_string::insert(iterator, InputIterator, InputIterator)):
Likewise.
(basic_string::insert(iterator, initializer_list<C>)): Change first
parameter to const_iterator and return type to iterator.
* src/c++11/string-inst.cc: Extend comment.
* testsuite/21_strings/basic_string/modifiers/insert/char/83328.cc:
New.
* testsuite/21_strings/basic_string/modifiers/insert/wchar_t/83328.cc:
New.
* testsuite/util/testsuite_abi.cc: Add new symbol version.
From-SVN: r261866
2018-06-22 06:01:25 +08:00
|
|
|
return iterator(__res, this);
|
2003-11-12 04:09:16 +08:00
|
|
|
}
|
|
|
|
|
2012-11-11 01:27:22 +08:00
|
|
|
#if __cplusplus >= 201103L
|
PR libstdc++/83328 add correct basic_string::insert for initializer_list
The SSO basic_string has a non-standard insert(iterator, initializer_list)
overload, from a C++0x draft. This adds the correct overload, while also
preserving the old one so that the old symbol is still exported from the
library.
The COW basic_string doesn't have any of the C++11 changes to the insert
overloads (they all still have non-const iterator parameters and the
ones that should return an iterator still return void). This doesn't
make any change to the COW string.
PR libstdc++/83328
* acinclude.m4 (libtool_VERSION): Bump to 6:26:0.
* config/abi/pre/gnu.ver: Add GLIBCXX_3.4.26 and export new symbol.
* configure: Regenerate.
* include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
(basic_string::insert(const_iterator, initializer_list<C>)): Add.
[_GLIBCXX_USE_CXX11_ABI && !_GLIBCXX_DEFINING_STRING_INSTANTIATIONS]
(basic_string::insert(iterator, initializer_list<C>)): Suppress
definition.
* include/debug/string (basic_string::insert(iterator, C)): Change
first parameter to const_iterator.
(basic_string::insert(iterator, size_type, C)): Likewise. Change
return type to iterator.
(basic_string::insert(iterator, InputIterator, InputIterator)):
Likewise.
(basic_string::insert(iterator, initializer_list<C>)): Change first
parameter to const_iterator and return type to iterator.
* src/c++11/string-inst.cc: Extend comment.
* testsuite/21_strings/basic_string/modifiers/insert/char/83328.cc:
New.
* testsuite/21_strings/basic_string/modifiers/insert/wchar_t/83328.cc:
New.
* testsuite/util/testsuite_abi.cc: Add new symbol version.
From-SVN: r261866
2018-06-22 06:01:25 +08:00
|
|
|
iterator
|
|
|
|
insert(const_iterator __p, std::initializer_list<_CharT> __l)
|
2008-07-22 03:40:39 +08:00
|
|
|
{
|
2011-02-20 04:51:43 +08:00
|
|
|
__glibcxx_check_insert(__p);
|
PR libstdc++/83328 add correct basic_string::insert for initializer_list
The SSO basic_string has a non-standard insert(iterator, initializer_list)
overload, from a C++0x draft. This adds the correct overload, while also
preserving the old one so that the old symbol is still exported from the
library.
The COW basic_string doesn't have any of the C++11 changes to the insert
overloads (they all still have non-const iterator parameters and the
ones that should return an iterator still return void). This doesn't
make any change to the COW string.
PR libstdc++/83328
* acinclude.m4 (libtool_VERSION): Bump to 6:26:0.
* config/abi/pre/gnu.ver: Add GLIBCXX_3.4.26 and export new symbol.
* configure: Regenerate.
* include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
(basic_string::insert(const_iterator, initializer_list<C>)): Add.
[_GLIBCXX_USE_CXX11_ABI && !_GLIBCXX_DEFINING_STRING_INSTANTIATIONS]
(basic_string::insert(iterator, initializer_list<C>)): Suppress
definition.
* include/debug/string (basic_string::insert(iterator, C)): Change
first parameter to const_iterator.
(basic_string::insert(iterator, size_type, C)): Likewise. Change
return type to iterator.
(basic_string::insert(iterator, InputIterator, InputIterator)):
Likewise.
(basic_string::insert(iterator, initializer_list<C>)): Change first
parameter to const_iterator and return type to iterator.
* src/c++11/string-inst.cc: Extend comment.
* testsuite/21_strings/basic_string/modifiers/insert/char/83328.cc:
New.
* testsuite/21_strings/basic_string/modifiers/insert/wchar_t/83328.cc:
New.
* testsuite/util/testsuite_abi.cc: Add new symbol version.
From-SVN: r261866
2018-06-22 06:01:25 +08:00
|
|
|
const auto __res = _Base::insert(__p.base(), __l);
|
2008-07-22 03:40:39 +08:00
|
|
|
this->_M_invalidate_all();
|
PR libstdc++/83328 add correct basic_string::insert for initializer_list
The SSO basic_string has a non-standard insert(iterator, initializer_list)
overload, from a C++0x draft. This adds the correct overload, while also
preserving the old one so that the old symbol is still exported from the
library.
The COW basic_string doesn't have any of the C++11 changes to the insert
overloads (they all still have non-const iterator parameters and the
ones that should return an iterator still return void). This doesn't
make any change to the COW string.
PR libstdc++/83328
* acinclude.m4 (libtool_VERSION): Bump to 6:26:0.
* config/abi/pre/gnu.ver: Add GLIBCXX_3.4.26 and export new symbol.
* configure: Regenerate.
* include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
(basic_string::insert(const_iterator, initializer_list<C>)): Add.
[_GLIBCXX_USE_CXX11_ABI && !_GLIBCXX_DEFINING_STRING_INSTANTIATIONS]
(basic_string::insert(iterator, initializer_list<C>)): Suppress
definition.
* include/debug/string (basic_string::insert(iterator, C)): Change
first parameter to const_iterator.
(basic_string::insert(iterator, size_type, C)): Likewise. Change
return type to iterator.
(basic_string::insert(iterator, InputIterator, InputIterator)):
Likewise.
(basic_string::insert(iterator, initializer_list<C>)): Change first
parameter to const_iterator and return type to iterator.
* src/c++11/string-inst.cc: Extend comment.
* testsuite/21_strings/basic_string/modifiers/insert/char/83328.cc:
New.
* testsuite/21_strings/basic_string/modifiers/insert/wchar_t/83328.cc:
New.
* testsuite/util/testsuite_abi.cc: Add new symbol version.
From-SVN: r261866
2018-06-22 06:01:25 +08:00
|
|
|
return iterator(__res, this);
|
2008-07-22 03:40:39 +08:00
|
|
|
}
|
2012-11-11 01:27:22 +08:00
|
|
|
#endif // C++11
|
2008-07-22 03:40:39 +08:00
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
basic_string&
|
2003-11-12 04:09:16 +08:00
|
|
|
erase(size_type __pos = 0, size_type __n = _Base::npos)
|
|
|
|
{
|
|
|
|
_Base::erase(__pos, __n);
|
|
|
|
this->_M_invalidate_all();
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
iterator
|
2003-11-12 04:09:16 +08:00
|
|
|
erase(iterator __position)
|
|
|
|
{
|
|
|
|
__glibcxx_check_erase(__position);
|
|
|
|
typename _Base::iterator __res = _Base::erase(__position.base());
|
|
|
|
this->_M_invalidate_all();
|
|
|
|
return iterator(__res, this);
|
|
|
|
}
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
iterator
|
2003-11-12 04:09:16 +08:00
|
|
|
erase(iterator __first, iterator __last)
|
|
|
|
{
|
|
|
|
// _GLIBCXX_RESOLVE_LIB_DEFECTS
|
|
|
|
// 151. can't currently clear() empty container
|
|
|
|
__glibcxx_check_erase_range(__first, __last);
|
|
|
|
typename _Base::iterator __res = _Base::erase(__first.base(),
|
2014-05-07 03:59:44 +08:00
|
|
|
__last.base());
|
2003-11-12 04:09:16 +08:00
|
|
|
this->_M_invalidate_all();
|
|
|
|
return iterator(__res, this);
|
|
|
|
}
|
|
|
|
|
2012-11-11 01:27:22 +08:00
|
|
|
#if __cplusplus >= 201103L
|
2011-11-07 08:06:23 +08:00
|
|
|
void
|
re PR libstdc++/58338 (Add noexcept to functions with a narrow contract)
2013-09-24 Marc Glisse <marc.glisse@inria.fr>
PR libstdc++/58338
PR libstdc++/56166
* include/bits/basic_string.h (basic_string)
[basic_string(basic_string&&)]: Make the noexcept conditional.
[operator=(basic_string&&), assign(basic_string&&)]: Link to PR 58265.
[begin(), end(), rbegin(), rend(), clear]: Remove noexcept.
[pop_back]: Comment on the lack of noexcept.
* include/debug/string (basic_string) [basic_string(const _Allocator&),
basic_string(basic_string&&), begin(), end(), rbegin(), rend(), clear,
operator[](size_type), pop_back]: Comment out noexcept, until vstring
replaces basic_string.
From-SVN: r202861
2013-09-24 18:07:32 +08:00
|
|
|
pop_back() // noexcept
|
2011-11-07 08:06:23 +08:00
|
|
|
{
|
|
|
|
__glibcxx_check_nonempty();
|
|
|
|
_Base::pop_back();
|
|
|
|
this->_M_invalidate_all();
|
|
|
|
}
|
2012-11-11 01:27:22 +08:00
|
|
|
#endif // C++11
|
2011-11-07 08:06:23 +08:00
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
basic_string&
|
2003-11-12 04:09:16 +08:00
|
|
|
replace(size_type __pos1, size_type __n1, const basic_string& __str)
|
|
|
|
{
|
|
|
|
_Base::replace(__pos1, __n1, __str);
|
|
|
|
this->_M_invalidate_all();
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
basic_string&
|
2003-11-12 04:09:16 +08:00
|
|
|
replace(size_type __pos1, size_type __n1, const basic_string& __str,
|
|
|
|
size_type __pos2, size_type __n2)
|
|
|
|
{
|
|
|
|
_Base::replace(__pos1, __n1, __str, __pos2, __n2);
|
|
|
|
this->_M_invalidate_all();
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
basic_string&
|
|
|
|
replace(size_type __pos, size_type __n1, const _CharT* __s,
|
2003-11-12 04:09:16 +08:00
|
|
|
size_type __n2)
|
|
|
|
{
|
|
|
|
__glibcxx_check_string_len(__s, __n2);
|
|
|
|
_Base::replace(__pos, __n1, __s, __n2);
|
|
|
|
this->_M_invalidate_all();
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
basic_string&
|
2003-11-12 04:09:16 +08:00
|
|
|
replace(size_type __pos, size_type __n1, const _CharT* __s)
|
|
|
|
{
|
|
|
|
__glibcxx_check_string(__s);
|
|
|
|
_Base::replace(__pos, __n1, __s);
|
|
|
|
this->_M_invalidate_all();
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
basic_string&
|
2003-11-12 04:09:16 +08:00
|
|
|
replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c)
|
|
|
|
{
|
|
|
|
_Base::replace(__pos, __n1, __n2, __c);
|
|
|
|
this->_M_invalidate_all();
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
basic_string&
|
2003-11-12 04:09:16 +08:00
|
|
|
replace(iterator __i1, iterator __i2, const basic_string& __str)
|
|
|
|
{
|
|
|
|
__glibcxx_check_erase_range(__i1, __i2);
|
|
|
|
_Base::replace(__i1.base(), __i2.base(), __str);
|
|
|
|
this->_M_invalidate_all();
|
|
|
|
return *this;
|
|
|
|
}
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
|
|
|
|
basic_string&
|
2003-11-12 04:09:16 +08:00
|
|
|
replace(iterator __i1, iterator __i2, const _CharT* __s, size_type __n)
|
|
|
|
{
|
|
|
|
__glibcxx_check_erase_range(__i1, __i2);
|
|
|
|
__glibcxx_check_string_len(__s, __n);
|
|
|
|
_Base::replace(__i1.base(), __i2.base(), __s, __n);
|
|
|
|
this->_M_invalidate_all();
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
basic_string&
|
2003-11-12 04:09:16 +08:00
|
|
|
replace(iterator __i1, iterator __i2, const _CharT* __s)
|
|
|
|
{
|
|
|
|
__glibcxx_check_erase_range(__i1, __i2);
|
|
|
|
__glibcxx_check_string(__s);
|
|
|
|
_Base::replace(__i1.base(), __i2.base(), __s);
|
|
|
|
this->_M_invalidate_all();
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
basic_string&
|
2003-11-12 04:09:16 +08:00
|
|
|
replace(iterator __i1, iterator __i2, size_type __n, _CharT __c)
|
|
|
|
{
|
|
|
|
__glibcxx_check_erase_range(__i1, __i2);
|
|
|
|
_Base::replace(__i1.base(), __i2.base(), __n, __c);
|
|
|
|
this->_M_invalidate_all();
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
template<typename _InputIterator>
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
basic_string&
|
2003-11-12 04:09:16 +08:00
|
|
|
replace(iterator __i1, iterator __i2,
|
|
|
|
_InputIterator __j1, _InputIterator __j2)
|
|
|
|
{
|
|
|
|
__glibcxx_check_erase_range(__i1, __i2);
|
stl_iterator_base_types.h (_Iter_base): Limit definition to pre-C++11 mode.
2015-06-29 François Dumont <fdumont@gcc.gnu.org>
* include/bits/stl_iterator_base_types.h (_Iter_base): Limit definition
to pre-C++11 mode.
* include/debug/functions.h
(__gnu_debug::__valid_range, __gnu_debug::__base): Move...
* include/debug/safe_iterator.h
(__gnu_debug::_Sequence_traits): New.
(__gnu_debug::__get_distance_from_begin): New.
(__gnu_debug::__get_distance_to_end): New.
(__gnu_debug::_Safe_iterator<>::_M_valid_range): Expose iterator range
distance information. Add optional check_dereferenceable parameter,
default true.
(__gnu_debug::_Distance_precision, __gnu_debug::__get_distance): Move
default definition...
(__gnu_debug::__get_distance): New overload for _Safe_iterator.
(__gnu_debug::__unsafe): Likewise.
* include/debug/helper_functions.h: ...here. New.
(__gnu_debug::__unsafe): New helper function to remove safe iterator
layer.
* include/debug/stl_iterator.h: New. Include latter.
* include/bits/stl_iterator.h: Include latter in debug mode.
* include/debug/stl_iterator.tcc: Adapt.
* include/debug/safe_local_iterator.h (__gnu_debug::__get_distance): Add
overload for _Safe_local_iterator.
(__gnu_debug::__unsafe): Likewise.
* include/debug/safe_local_iterator.tcc: Adapt.
* include/debug/macros.h (__glibcxx_check_valid_range2): New.
(__glibcxx_check_insert_range): Add _Dist parameter.
(__glibcxx_check_insert_range_after): Likewise.
(__glibcxx_check_string, __glibcxx_check_string_len): Implement using
_GLIBCXX_DEBUG_PEDASSERT.
* include/debug/deque (deque<>::assign): Remove iterator debug layer
when possible.
(deque<>::insert): Likewise.
* include/debug/forward_list (__glibcxx_check_valid_fl_range): New.
(forward_list<>::splice_after): Use latter.
(forward_list<>::assign): Remove iterator debug layer when possible.
(forward_list<>::insert_after): Likewise.
(__gnu_debug::_Sequence_traits<>): Partial specialization.
* include/debug/list (list<>::assign): Remove iterator debug layer when
possible.
(list<>::insert): Likewise.
[__gnu_debug::_Sequence_traits<>]: Partial specialization pre C++11 ABI.
* include/debug/map.h (map<>::insert): Remove iterator debug layer when
possible.
* include/debug/multimap.h (multimap<>::insert): Likewise.
* include/debug/set.h (set<>::insert): Likewise.
* include/debug/multiset.h (multiset<>::insert): Likewise.
* include/debug/string (basic_string<>::append, basic_string<>::assign,
basic_string<>::insert, basic_string<>::replace): Likewise.
* include/debug/unordered_map
(unordered_map<>::insert, unordered_multimap<>::insert): Likewise.
* include/debug/unordered_set
(unordered_set<>::insert, unordered_multiset<>insert): Likewise.
* include/debug/vector
(vector<>::assign, vector<>::insert): Likewise.
* include/Makefile.am: Add new debug headers.
* include/Makefile.in: Regenerate.
From-SVN: r225143
2015-06-30 04:17:56 +08:00
|
|
|
|
|
|
|
typename __gnu_debug::_Distance_traits<_InputIterator>::__type __dist;
|
|
|
|
__glibcxx_check_valid_range2(__j1, __j2, __dist);
|
|
|
|
|
|
|
|
if (__dist.second >= __dp_sign)
|
|
|
|
_Base::replace(__i1.base(), __i2.base(),
|
|
|
|
__gnu_debug::__unsafe(__j1),
|
|
|
|
__gnu_debug::__unsafe(__j2));
|
|
|
|
else
|
|
|
|
_Base::replace(__i1.base(), __i2.base(), __j1, __j2);
|
|
|
|
|
2003-11-12 04:09:16 +08:00
|
|
|
this->_M_invalidate_all();
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2012-11-11 01:27:22 +08:00
|
|
|
#if __cplusplus >= 201103L
|
2008-07-22 03:40:39 +08:00
|
|
|
basic_string& replace(iterator __i1, iterator __i2,
|
2010-01-11 00:15:58 +08:00
|
|
|
std::initializer_list<_CharT> __l)
|
2008-07-22 03:40:39 +08:00
|
|
|
{
|
|
|
|
__glibcxx_check_erase_range(__i1, __i2);
|
|
|
|
_Base::replace(__i1.base(), __i2.base(), __l);
|
|
|
|
this->_M_invalidate_all();
|
|
|
|
return *this;
|
|
|
|
}
|
2012-11-11 01:27:22 +08:00
|
|
|
#endif // C++11
|
2008-07-22 03:40:39 +08:00
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
size_type
|
2003-11-12 04:09:16 +08:00
|
|
|
copy(_CharT* __s, size_type __n, size_type __pos = 0) const
|
|
|
|
{
|
|
|
|
__glibcxx_check_string_len(__s, __n);
|
|
|
|
return _Base::copy(__s, __n, __pos);
|
|
|
|
}
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
void
|
2014-05-07 03:59:44 +08:00
|
|
|
swap(basic_string& __x)
|
2015-09-11 19:02:14 +08:00
|
|
|
_GLIBCXX_NOEXCEPT_IF(std::__is_nothrow_swappable<_Base>::value)
|
2003-11-12 04:09:16 +08:00
|
|
|
{
|
2014-05-07 03:59:44 +08:00
|
|
|
_Safe::_M_swap(__x);
|
2003-11-12 04:09:16 +08:00
|
|
|
_Base::swap(__x);
|
|
|
|
}
|
|
|
|
|
|
|
|
// 21.3.6 string operations:
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
const _CharT*
|
2011-05-31 20:50:31 +08:00
|
|
|
c_str() const _GLIBCXX_NOEXCEPT
|
2003-11-12 04:09:16 +08:00
|
|
|
{
|
|
|
|
const _CharT* __res = _Base::c_str();
|
|
|
|
this->_M_invalidate_all();
|
|
|
|
return __res;
|
|
|
|
}
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
const _CharT*
|
2011-05-31 20:50:31 +08:00
|
|
|
data() const _GLIBCXX_NOEXCEPT
|
2003-11-12 04:09:16 +08:00
|
|
|
{
|
|
|
|
const _CharT* __res = _Base::data();
|
|
|
|
this->_M_invalidate_all();
|
|
|
|
return __res;
|
|
|
|
}
|
|
|
|
|
|
|
|
using _Base::get_allocator;
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
size_type
|
2003-11-12 04:09:16 +08:00
|
|
|
find(const basic_string& __str, size_type __pos = 0) const
|
2011-05-31 20:50:31 +08:00
|
|
|
_GLIBCXX_NOEXCEPT
|
2003-11-12 04:09:16 +08:00
|
|
|
{ return _Base::find(__str, __pos); }
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
size_type
|
2003-11-12 04:09:16 +08:00
|
|
|
find(const _CharT* __s, size_type __pos, size_type __n) const
|
|
|
|
{
|
|
|
|
__glibcxx_check_string(__s);
|
|
|
|
return _Base::find(__s, __pos, __n);
|
|
|
|
}
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
size_type
|
2003-11-12 04:09:16 +08:00
|
|
|
find(const _CharT* __s, size_type __pos = 0) const
|
|
|
|
{
|
|
|
|
__glibcxx_check_string(__s);
|
|
|
|
return _Base::find(__s, __pos);
|
|
|
|
}
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
size_type
|
2011-05-31 20:50:31 +08:00
|
|
|
find(_CharT __c, size_type __pos = 0) const _GLIBCXX_NOEXCEPT
|
2003-11-12 04:09:16 +08:00
|
|
|
{ return _Base::find(__c, __pos); }
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
size_type
|
2003-11-12 04:09:16 +08:00
|
|
|
rfind(const basic_string& __str, size_type __pos = _Base::npos) const
|
2011-05-31 20:50:31 +08:00
|
|
|
_GLIBCXX_NOEXCEPT
|
2003-11-12 04:09:16 +08:00
|
|
|
{ return _Base::rfind(__str, __pos); }
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
size_type
|
2003-11-12 04:09:16 +08:00
|
|
|
rfind(const _CharT* __s, size_type __pos, size_type __n) const
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
{
|
2003-11-12 04:09:16 +08:00
|
|
|
__glibcxx_check_string_len(__s, __n);
|
|
|
|
return _Base::rfind(__s, __pos, __n);
|
|
|
|
}
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
size_type
|
2003-11-12 04:09:16 +08:00
|
|
|
rfind(const _CharT* __s, size_type __pos = _Base::npos) const
|
|
|
|
{
|
|
|
|
__glibcxx_check_string(__s);
|
|
|
|
return _Base::rfind(__s, __pos);
|
|
|
|
}
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
size_type
|
2011-05-31 20:50:31 +08:00
|
|
|
rfind(_CharT __c, size_type __pos = _Base::npos) const _GLIBCXX_NOEXCEPT
|
2003-11-12 04:09:16 +08:00
|
|
|
{ return _Base::rfind(__c, __pos); }
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
|
|
|
|
size_type
|
2003-11-12 04:09:16 +08:00
|
|
|
find_first_of(const basic_string& __str, size_type __pos = 0) const
|
2011-05-31 20:50:31 +08:00
|
|
|
_GLIBCXX_NOEXCEPT
|
2003-11-12 04:09:16 +08:00
|
|
|
{ return _Base::find_first_of(__str, __pos); }
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
size_type
|
2003-11-12 04:09:16 +08:00
|
|
|
find_first_of(const _CharT* __s, size_type __pos, size_type __n) const
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
{
|
2003-11-12 04:09:16 +08:00
|
|
|
__glibcxx_check_string(__s);
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
return _Base::find_first_of(__s, __pos, __n);
|
2003-11-12 04:09:16 +08:00
|
|
|
}
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
size_type
|
2003-11-12 04:09:16 +08:00
|
|
|
find_first_of(const _CharT* __s, size_type __pos = 0) const
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
{
|
2003-11-12 04:09:16 +08:00
|
|
|
__glibcxx_check_string(__s);
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
return _Base::find_first_of(__s, __pos);
|
2003-11-12 04:09:16 +08:00
|
|
|
}
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
size_type
|
2011-05-31 20:50:31 +08:00
|
|
|
find_first_of(_CharT __c, size_type __pos = 0) const _GLIBCXX_NOEXCEPT
|
2003-11-12 04:09:16 +08:00
|
|
|
{ return _Base::find_first_of(__c, __pos); }
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
size_type
|
2014-05-07 03:59:44 +08:00
|
|
|
find_last_of(const basic_string& __str,
|
2011-05-31 20:50:31 +08:00
|
|
|
size_type __pos = _Base::npos) const _GLIBCXX_NOEXCEPT
|
2003-11-12 04:09:16 +08:00
|
|
|
{ return _Base::find_last_of(__str, __pos); }
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
size_type
|
2003-11-12 04:09:16 +08:00
|
|
|
find_last_of(const _CharT* __s, size_type __pos, size_type __n) const
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
{
|
2003-11-12 04:09:16 +08:00
|
|
|
__glibcxx_check_string(__s);
|
|
|
|
return _Base::find_last_of(__s, __pos, __n);
|
|
|
|
}
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
size_type
|
2003-11-12 04:09:16 +08:00
|
|
|
find_last_of(const _CharT* __s, size_type __pos = _Base::npos) const
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
{
|
2003-11-12 04:09:16 +08:00
|
|
|
__glibcxx_check_string(__s);
|
|
|
|
return _Base::find_last_of(__s, __pos);
|
|
|
|
}
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
size_type
|
2003-11-12 04:09:16 +08:00
|
|
|
find_last_of(_CharT __c, size_type __pos = _Base::npos) const
|
2011-05-31 20:50:31 +08:00
|
|
|
_GLIBCXX_NOEXCEPT
|
2003-11-12 04:09:16 +08:00
|
|
|
{ return _Base::find_last_of(__c, __pos); }
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
size_type
|
2003-11-12 04:09:16 +08:00
|
|
|
find_first_not_of(const basic_string& __str, size_type __pos = 0) const
|
2011-05-31 20:50:31 +08:00
|
|
|
_GLIBCXX_NOEXCEPT
|
2003-11-12 04:09:16 +08:00
|
|
|
{ return _Base::find_first_not_of(__str, __pos); }
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
size_type
|
2003-11-12 04:09:16 +08:00
|
|
|
find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const
|
|
|
|
{
|
|
|
|
__glibcxx_check_string_len(__s, __n);
|
|
|
|
return _Base::find_first_not_of(__s, __pos, __n);
|
|
|
|
}
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
size_type
|
2003-11-12 04:09:16 +08:00
|
|
|
find_first_not_of(const _CharT* __s, size_type __pos = 0) const
|
|
|
|
{
|
|
|
|
__glibcxx_check_string(__s);
|
|
|
|
return _Base::find_first_not_of(__s, __pos);
|
|
|
|
}
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
size_type
|
2011-05-31 20:50:31 +08:00
|
|
|
find_first_not_of(_CharT __c, size_type __pos = 0) const _GLIBCXX_NOEXCEPT
|
2003-11-12 04:09:16 +08:00
|
|
|
{ return _Base::find_first_not_of(__c, __pos); }
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
size_type
|
2003-11-12 04:09:16 +08:00
|
|
|
find_last_not_of(const basic_string& __str,
|
|
|
|
size_type __pos = _Base::npos) const
|
2011-05-31 20:50:31 +08:00
|
|
|
_GLIBCXX_NOEXCEPT
|
2003-11-12 04:09:16 +08:00
|
|
|
{ return _Base::find_last_not_of(__str, __pos); }
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
size_type
|
2003-11-12 04:09:16 +08:00
|
|
|
find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const
|
|
|
|
{
|
|
|
|
__glibcxx_check_string(__s);
|
|
|
|
return _Base::find_last_not_of(__s, __pos, __n);
|
|
|
|
}
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
size_type
|
2003-11-12 04:09:16 +08:00
|
|
|
find_last_not_of(const _CharT* __s, size_type __pos = _Base::npos) const
|
|
|
|
{
|
|
|
|
__glibcxx_check_string(__s);
|
|
|
|
return _Base::find_last_not_of(__s, __pos);
|
|
|
|
}
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
size_type
|
2003-11-12 04:09:16 +08:00
|
|
|
find_last_not_of(_CharT __c, size_type __pos = _Base::npos) const
|
2011-05-31 20:50:31 +08:00
|
|
|
_GLIBCXX_NOEXCEPT
|
2003-11-12 04:09:16 +08:00
|
|
|
{ return _Base::find_last_not_of(__c, __pos); }
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
basic_string
|
2003-11-12 04:09:16 +08:00
|
|
|
substr(size_type __pos = 0, size_type __n = _Base::npos) const
|
|
|
|
{ return basic_string(_Base::substr(__pos, __n)); }
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
int
|
2003-11-12 04:09:16 +08:00
|
|
|
compare(const basic_string& __str) const
|
|
|
|
{ return _Base::compare(__str); }
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
int
|
2003-11-12 04:09:16 +08:00
|
|
|
compare(size_type __pos1, size_type __n1,
|
|
|
|
const basic_string& __str) const
|
|
|
|
{ return _Base::compare(__pos1, __n1, __str); }
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
int
|
2003-11-12 04:09:16 +08:00
|
|
|
compare(size_type __pos1, size_type __n1, const basic_string& __str,
|
|
|
|
size_type __pos2, size_type __n2) const
|
|
|
|
{ return _Base::compare(__pos1, __n1, __str, __pos2, __n2); }
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
int
|
2003-11-12 04:09:16 +08:00
|
|
|
compare(const _CharT* __s) const
|
|
|
|
{
|
|
|
|
__glibcxx_check_string(__s);
|
|
|
|
return _Base::compare(__s);
|
|
|
|
}
|
|
|
|
|
|
|
|
// _GLIBCXX_RESOLVE_LIB_DEFECTS
|
|
|
|
// 5. string::compare specification questionable
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
int
|
2003-11-12 04:09:16 +08:00
|
|
|
compare(size_type __pos1, size_type __n1, const _CharT* __s) const
|
|
|
|
{
|
|
|
|
__glibcxx_check_string(__s);
|
|
|
|
return _Base::compare(__pos1, __n1, __s);
|
|
|
|
}
|
|
|
|
|
|
|
|
// _GLIBCXX_RESOLVE_LIB_DEFECTS
|
|
|
|
// 5. string::compare specification questionable
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
int
|
2003-11-12 04:09:16 +08:00
|
|
|
compare(size_type __pos1, size_type __n1,const _CharT* __s,
|
2014-05-07 03:59:44 +08:00
|
|
|
size_type __n2) const
|
2003-11-12 04:09:16 +08:00
|
|
|
{
|
|
|
|
__glibcxx_check_string_len(__s, __n2);
|
|
|
|
return _Base::compare(__pos1, __n1, __s, __n2);
|
|
|
|
}
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
_Base&
|
2014-05-07 03:59:44 +08:00
|
|
|
_M_base() _GLIBCXX_NOEXCEPT { return *this; }
|
2003-11-12 04:09:16 +08:00
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
const _Base&
|
2014-05-07 03:59:44 +08:00
|
|
|
_M_base() const _GLIBCXX_NOEXCEPT { return *this; }
|
2003-11-12 04:09:16 +08:00
|
|
|
|
2014-05-07 03:59:44 +08:00
|
|
|
using _Safe::_M_invalidate_all;
|
2003-11-12 04:09:16 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
template<typename _CharT, typename _Traits, typename _Allocator>
|
|
|
|
inline basic_string<_CharT,_Traits,_Allocator>
|
|
|
|
operator+(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
|
|
|
|
const basic_string<_CharT,_Traits,_Allocator>& __rhs)
|
|
|
|
{ return basic_string<_CharT,_Traits,_Allocator>(__lhs) += __rhs; }
|
|
|
|
|
|
|
|
template<typename _CharT, typename _Traits, typename _Allocator>
|
|
|
|
inline basic_string<_CharT,_Traits,_Allocator>
|
|
|
|
operator+(const _CharT* __lhs,
|
|
|
|
const basic_string<_CharT,_Traits,_Allocator>& __rhs)
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
{
|
2003-11-12 04:09:16 +08:00
|
|
|
__glibcxx_check_string(__lhs);
|
|
|
|
return basic_string<_CharT,_Traits,_Allocator>(__lhs) += __rhs;
|
|
|
|
}
|
|
|
|
|
|
|
|
template<typename _CharT, typename _Traits, typename _Allocator>
|
|
|
|
inline basic_string<_CharT,_Traits,_Allocator>
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
operator+(_CharT __lhs,
|
2003-11-12 04:09:16 +08:00
|
|
|
const basic_string<_CharT,_Traits,_Allocator>& __rhs)
|
|
|
|
{ return basic_string<_CharT,_Traits,_Allocator>(1, __lhs) += __rhs; }
|
|
|
|
|
|
|
|
template<typename _CharT, typename _Traits, typename _Allocator>
|
|
|
|
inline basic_string<_CharT,_Traits,_Allocator>
|
|
|
|
operator+(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
|
|
|
|
const _CharT* __rhs)
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
{
|
2003-11-12 04:09:16 +08:00
|
|
|
__glibcxx_check_string(__rhs);
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
return basic_string<_CharT,_Traits,_Allocator>(__lhs) += __rhs;
|
2003-11-12 04:09:16 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
template<typename _CharT, typename _Traits, typename _Allocator>
|
|
|
|
inline basic_string<_CharT,_Traits,_Allocator>
|
|
|
|
operator+(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
|
|
|
|
_CharT __rhs)
|
|
|
|
{ return basic_string<_CharT,_Traits,_Allocator>(__lhs) += __rhs; }
|
|
|
|
|
|
|
|
template<typename _CharT, typename _Traits, typename _Allocator>
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
inline bool
|
2003-11-12 04:09:16 +08:00
|
|
|
operator==(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
|
|
|
|
const basic_string<_CharT,_Traits,_Allocator>& __rhs)
|
|
|
|
{ return __lhs._M_base() == __rhs._M_base(); }
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
|
2003-11-12 04:09:16 +08:00
|
|
|
template<typename _CharT, typename _Traits, typename _Allocator>
|
|
|
|
inline bool
|
|
|
|
operator==(const _CharT* __lhs,
|
|
|
|
const basic_string<_CharT,_Traits,_Allocator>& __rhs)
|
|
|
|
{
|
|
|
|
__glibcxx_check_string(__lhs);
|
|
|
|
return __lhs == __rhs._M_base();
|
|
|
|
}
|
|
|
|
|
|
|
|
template<typename _CharT, typename _Traits, typename _Allocator>
|
|
|
|
inline bool
|
|
|
|
operator==(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
|
|
|
|
const _CharT* __rhs)
|
|
|
|
{
|
|
|
|
__glibcxx_check_string(__rhs);
|
|
|
|
return __lhs._M_base() == __rhs;
|
|
|
|
}
|
|
|
|
|
|
|
|
template<typename _CharT, typename _Traits, typename _Allocator>
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
inline bool
|
2003-11-12 04:09:16 +08:00
|
|
|
operator!=(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
|
|
|
|
const basic_string<_CharT,_Traits,_Allocator>& __rhs)
|
|
|
|
{ return __lhs._M_base() != __rhs._M_base(); }
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
|
2003-11-12 04:09:16 +08:00
|
|
|
template<typename _CharT, typename _Traits, typename _Allocator>
|
|
|
|
inline bool
|
|
|
|
operator!=(const _CharT* __lhs,
|
|
|
|
const basic_string<_CharT,_Traits,_Allocator>& __rhs)
|
|
|
|
{
|
|
|
|
__glibcxx_check_string(__lhs);
|
|
|
|
return __lhs != __rhs._M_base();
|
|
|
|
}
|
|
|
|
|
|
|
|
template<typename _CharT, typename _Traits, typename _Allocator>
|
|
|
|
inline bool
|
|
|
|
operator!=(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
|
|
|
|
const _CharT* __rhs)
|
|
|
|
{
|
|
|
|
__glibcxx_check_string(__rhs);
|
|
|
|
return __lhs._M_base() != __rhs;
|
|
|
|
}
|
|
|
|
|
|
|
|
template<typename _CharT, typename _Traits, typename _Allocator>
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
inline bool
|
2003-11-12 04:09:16 +08:00
|
|
|
operator<(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
|
|
|
|
const basic_string<_CharT,_Traits,_Allocator>& __rhs)
|
|
|
|
{ return __lhs._M_base() < __rhs._M_base(); }
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
|
2003-11-12 04:09:16 +08:00
|
|
|
template<typename _CharT, typename _Traits, typename _Allocator>
|
|
|
|
inline bool
|
|
|
|
operator<(const _CharT* __lhs,
|
|
|
|
const basic_string<_CharT,_Traits,_Allocator>& __rhs)
|
|
|
|
{
|
|
|
|
__glibcxx_check_string(__lhs);
|
|
|
|
return __lhs < __rhs._M_base();
|
|
|
|
}
|
|
|
|
|
|
|
|
template<typename _CharT, typename _Traits, typename _Allocator>
|
|
|
|
inline bool
|
|
|
|
operator<(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
|
|
|
|
const _CharT* __rhs)
|
|
|
|
{
|
|
|
|
__glibcxx_check_string(__rhs);
|
|
|
|
return __lhs._M_base() < __rhs;
|
|
|
|
}
|
|
|
|
|
|
|
|
template<typename _CharT, typename _Traits, typename _Allocator>
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
inline bool
|
2003-11-12 04:09:16 +08:00
|
|
|
operator<=(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
|
|
|
|
const basic_string<_CharT,_Traits,_Allocator>& __rhs)
|
|
|
|
{ return __lhs._M_base() <= __rhs._M_base(); }
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
|
2003-11-12 04:09:16 +08:00
|
|
|
template<typename _CharT, typename _Traits, typename _Allocator>
|
|
|
|
inline bool
|
|
|
|
operator<=(const _CharT* __lhs,
|
|
|
|
const basic_string<_CharT,_Traits,_Allocator>& __rhs)
|
|
|
|
{
|
|
|
|
__glibcxx_check_string(__lhs);
|
|
|
|
return __lhs <= __rhs._M_base();
|
|
|
|
}
|
|
|
|
|
|
|
|
template<typename _CharT, typename _Traits, typename _Allocator>
|
|
|
|
inline bool
|
|
|
|
operator<=(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
|
|
|
|
const _CharT* __rhs)
|
|
|
|
{
|
|
|
|
__glibcxx_check_string(__rhs);
|
|
|
|
return __lhs._M_base() <= __rhs;
|
|
|
|
}
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
|
2003-11-12 04:09:16 +08:00
|
|
|
template<typename _CharT, typename _Traits, typename _Allocator>
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
inline bool
|
2003-11-12 04:09:16 +08:00
|
|
|
operator>=(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
|
|
|
|
const basic_string<_CharT,_Traits,_Allocator>& __rhs)
|
|
|
|
{ return __lhs._M_base() >= __rhs._M_base(); }
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
|
2003-11-12 04:09:16 +08:00
|
|
|
template<typename _CharT, typename _Traits, typename _Allocator>
|
|
|
|
inline bool
|
|
|
|
operator>=(const _CharT* __lhs,
|
|
|
|
const basic_string<_CharT,_Traits,_Allocator>& __rhs)
|
|
|
|
{
|
|
|
|
__glibcxx_check_string(__lhs);
|
|
|
|
return __lhs >= __rhs._M_base();
|
|
|
|
}
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
|
2003-11-12 04:09:16 +08:00
|
|
|
template<typename _CharT, typename _Traits, typename _Allocator>
|
|
|
|
inline bool
|
|
|
|
operator>=(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
|
|
|
|
const _CharT* __rhs)
|
|
|
|
{
|
|
|
|
__glibcxx_check_string(__rhs);
|
|
|
|
return __lhs._M_base() >= __rhs;
|
|
|
|
}
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
|
2003-11-12 04:09:16 +08:00
|
|
|
template<typename _CharT, typename _Traits, typename _Allocator>
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
inline bool
|
2003-11-12 04:09:16 +08:00
|
|
|
operator>(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
|
|
|
|
const basic_string<_CharT,_Traits,_Allocator>& __rhs)
|
|
|
|
{ return __lhs._M_base() > __rhs._M_base(); }
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
|
2003-11-12 04:09:16 +08:00
|
|
|
template<typename _CharT, typename _Traits, typename _Allocator>
|
|
|
|
inline bool
|
|
|
|
operator>(const _CharT* __lhs,
|
|
|
|
const basic_string<_CharT,_Traits,_Allocator>& __rhs)
|
|
|
|
{
|
|
|
|
__glibcxx_check_string(__lhs);
|
|
|
|
return __lhs > __rhs._M_base();
|
|
|
|
}
|
|
|
|
|
|
|
|
template<typename _CharT, typename _Traits, typename _Allocator>
|
|
|
|
inline bool
|
|
|
|
operator>(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
|
|
|
|
const _CharT* __rhs)
|
|
|
|
{
|
|
|
|
__glibcxx_check_string(__rhs);
|
|
|
|
return __lhs._M_base() > __rhs;
|
|
|
|
}
|
|
|
|
|
|
|
|
// 21.3.7.8:
|
|
|
|
template<typename _CharT, typename _Traits, typename _Allocator>
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
inline void
|
2003-11-12 04:09:16 +08:00
|
|
|
swap(basic_string<_CharT,_Traits,_Allocator>& __lhs,
|
|
|
|
basic_string<_CharT,_Traits,_Allocator>& __rhs)
|
|
|
|
{ __lhs.swap(__rhs); }
|
|
|
|
|
|
|
|
template<typename _CharT, typename _Traits, typename _Allocator>
|
|
|
|
std::basic_ostream<_CharT, _Traits>&
|
|
|
|
operator<<(std::basic_ostream<_CharT, _Traits>& __os,
|
|
|
|
const basic_string<_CharT, _Traits, _Allocator>& __str)
|
|
|
|
{ return __os << __str._M_base(); }
|
|
|
|
|
|
|
|
template<typename _CharT, typename _Traits, typename _Allocator>
|
|
|
|
std::basic_istream<_CharT,_Traits>&
|
|
|
|
operator>>(std::basic_istream<_CharT,_Traits>& __is,
|
|
|
|
basic_string<_CharT,_Traits,_Allocator>& __str)
|
|
|
|
{
|
|
|
|
std::basic_istream<_CharT,_Traits>& __res = __is >> __str._M_base();
|
|
|
|
__str._M_invalidate_all();
|
|
|
|
return __res;
|
|
|
|
}
|
|
|
|
|
|
|
|
template<typename _CharT, typename _Traits, typename _Allocator>
|
|
|
|
std::basic_istream<_CharT,_Traits>&
|
|
|
|
getline(std::basic_istream<_CharT,_Traits>& __is,
|
|
|
|
basic_string<_CharT,_Traits,_Allocator>& __str, _CharT __delim)
|
|
|
|
{
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
std::basic_istream<_CharT,_Traits>& __res = getline(__is,
|
2003-11-12 04:09:16 +08:00
|
|
|
__str._M_base(),
|
|
|
|
__delim);
|
|
|
|
__str._M_invalidate_all();
|
|
|
|
return __res;
|
|
|
|
}
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
|
2003-11-12 04:09:16 +08:00
|
|
|
template<typename _CharT, typename _Traits, typename _Allocator>
|
|
|
|
std::basic_istream<_CharT,_Traits>&
|
|
|
|
getline(std::basic_istream<_CharT,_Traits>& __is,
|
|
|
|
basic_string<_CharT,_Traits,_Allocator>& __str)
|
|
|
|
{
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
std::basic_istream<_CharT,_Traits>& __res = getline(__is,
|
2003-11-12 04:09:16 +08:00
|
|
|
__str._M_base());
|
|
|
|
__str._M_invalidate_all();
|
|
|
|
return __res;
|
|
|
|
}
|
2005-05-24 18:58:22 +08:00
|
|
|
|
|
|
|
typedef basic_string<char> string;
|
|
|
|
|
|
|
|
#ifdef _GLIBCXX_USE_WCHAR_T
|
|
|
|
typedef basic_string<wchar_t> wstring;
|
|
|
|
#endif
|
|
|
|
|
2013-08-02 03:54:46 +08:00
|
|
|
template<typename _CharT, typename _Traits, typename _Allocator>
|
|
|
|
struct _Insert_range_from_self_is_safe<
|
|
|
|
__gnu_debug::basic_string<_CharT, _Traits, _Allocator> >
|
|
|
|
{ enum { __value = 1 }; };
|
|
|
|
|
2003-11-12 04:09:16 +08:00
|
|
|
} // namespace __gnu_debug
|
|
|
|
|
bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h,
include/debug/hash_multimap.h, include/debug/hash_multiset.h,
include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
include/debug/map.h, include/debug/multimap.h,
include/debug/multiset.h, include/debug/safe_base.h,
include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
include/debug/safe_sequence.h, include/debug/set.h,
include/debug/string, include/debug/vector: Remove trailing whitespace.
From-SVN: r74463
2003-12-09 12:26:28 +08:00
|
|
|
#endif
|