Commit cea8c6de by Paolo Carlini Committed by Paolo Carlini

basic_string.h: Use noexcept per the FDIS (minus compare(const string&)...

2011-05-31  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/basic_string.h: Use noexcept per the FDIS (minus
	compare(const string&), which uses char_traits::compare, which
	isn't noexcept; also no noexcept in the move assignment operator
	and move assign, see c++std-lib-30855).
	* include/bits/basic_string.tcc: Likewise.
	* include/ext/vstring.h: Likewise.
	* include/ext/vstring.tcc: Likewise.
	* include/debug/string: Likewise.

From-SVN: r174479
parent 35979cc2
2011-05-31 Paolo Carlini <paolo.carlini@oracle.com>
* include/bits/basic_string.h: Use noexcept per the FDIS (minus
compare(const string&), which uses char_traits::compare, which
isn't noexcept; also no noexcept in the move assignment operator
and move assign, see c++std-lib-30855).
* include/bits/basic_string.tcc: Likewise.
* include/ext/vstring.h: Likewise.
* include/ext/vstring.tcc: Likewise.
* include/debug/string: Likewise.
2011-05-31 Jonathan Wakely <jwakely.gcc@gmail.com> 2011-05-31 Jonathan Wakely <jwakely.gcc@gmail.com>
* doc/xml/manual/status_cxx200x.xml: Update. * doc/xml/manual/status_cxx200x.xml: Update.
......
...@@ -499,7 +499,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -499,7 +499,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* The newly-created string contains the exact contents of @a str. * The newly-created string contains the exact contents of @a str.
* @a str is a valid, but unspecified string. * @a str is a valid, but unspecified string.
**/ **/
basic_string(basic_string&& __str) basic_string(basic_string&& __str) noexcept
: _M_dataplus(__str._M_dataplus) : _M_dataplus(__str._M_dataplus)
{ {
#ifndef _GLIBCXX_FULLY_DYNAMIC_STRING #ifndef _GLIBCXX_FULLY_DYNAMIC_STRING
...@@ -597,7 +597,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -597,7 +597,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* the %string. Unshares the string. * the %string. Unshares the string.
*/ */
iterator iterator
begin() begin() _GLIBCXX_NOEXCEPT
{ {
_M_leak(); _M_leak();
return iterator(_M_data()); return iterator(_M_data());
...@@ -608,7 +608,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -608,7 +608,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* character in the %string. * character in the %string.
*/ */
const_iterator const_iterator
begin() const begin() const _GLIBCXX_NOEXCEPT
{ return const_iterator(_M_data()); } { return const_iterator(_M_data()); }
/** /**
...@@ -616,7 +616,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -616,7 +616,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* character in the %string. Unshares the string. * character in the %string. Unshares the string.
*/ */
iterator iterator
end() end() _GLIBCXX_NOEXCEPT
{ {
_M_leak(); _M_leak();
return iterator(_M_data() + this->size()); return iterator(_M_data() + this->size());
...@@ -627,7 +627,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -627,7 +627,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* last character in the %string. * last character in the %string.
*/ */
const_iterator const_iterator
end() const end() const _GLIBCXX_NOEXCEPT
{ return const_iterator(_M_data() + this->size()); } { return const_iterator(_M_data() + this->size()); }
/** /**
...@@ -636,7 +636,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -636,7 +636,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* order. Unshares the string. * order. Unshares the string.
*/ */
reverse_iterator reverse_iterator
rbegin() rbegin() _GLIBCXX_NOEXCEPT
{ return reverse_iterator(this->end()); } { return reverse_iterator(this->end()); }
/** /**
...@@ -645,7 +645,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -645,7 +645,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* reverse element order. * reverse element order.
*/ */
const_reverse_iterator const_reverse_iterator
rbegin() const rbegin() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(this->end()); } { return const_reverse_iterator(this->end()); }
/** /**
...@@ -654,7 +654,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -654,7 +654,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* element order. Unshares the string. * element order. Unshares the string.
*/ */
reverse_iterator reverse_iterator
rend() rend() _GLIBCXX_NOEXCEPT
{ return reverse_iterator(this->begin()); } { return reverse_iterator(this->begin()); }
/** /**
...@@ -663,7 +663,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -663,7 +663,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* is done in reverse element order. * is done in reverse element order.
*/ */
const_reverse_iterator const_reverse_iterator
rend() const rend() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(this->begin()); } { return const_reverse_iterator(this->begin()); }
#ifdef __GXX_EXPERIMENTAL_CXX0X__ #ifdef __GXX_EXPERIMENTAL_CXX0X__
...@@ -672,7 +672,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -672,7 +672,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* character in the %string. * character in the %string.
*/ */
const_iterator const_iterator
cbegin() const cbegin() const noexcept
{ return const_iterator(this->_M_data()); } { return const_iterator(this->_M_data()); }
/** /**
...@@ -680,7 +680,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -680,7 +680,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* last character in the %string. * last character in the %string.
*/ */
const_iterator const_iterator
cend() const cend() const noexcept
{ return const_iterator(this->_M_data() + this->size()); } { return const_iterator(this->_M_data() + this->size()); }
/** /**
...@@ -689,7 +689,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -689,7 +689,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* reverse element order. * reverse element order.
*/ */
const_reverse_iterator const_reverse_iterator
crbegin() const crbegin() const noexcept
{ return const_reverse_iterator(this->end()); } { return const_reverse_iterator(this->end()); }
/** /**
...@@ -698,7 +698,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -698,7 +698,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* is done in reverse element order. * is done in reverse element order.
*/ */
const_reverse_iterator const_reverse_iterator
crend() const crend() const noexcept
{ return const_reverse_iterator(this->begin()); } { return const_reverse_iterator(this->begin()); }
#endif #endif
...@@ -707,18 +707,18 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -707,18 +707,18 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
/// Returns the number of characters in the string, not including any /// Returns the number of characters in the string, not including any
/// null-termination. /// null-termination.
size_type size_type
size() const size() const _GLIBCXX_NOEXCEPT
{ return _M_rep()->_M_length; } { return _M_rep()->_M_length; }
/// Returns the number of characters in the string, not including any /// Returns the number of characters in the string, not including any
/// null-termination. /// null-termination.
size_type size_type
length() const length() const _GLIBCXX_NOEXCEPT
{ return _M_rep()->_M_length; } { return _M_rep()->_M_length; }
/// Returns the size() of the largest possible %string. /// Returns the size() of the largest possible %string.
size_type size_type
max_size() const max_size() const _GLIBCXX_NOEXCEPT
{ return _Rep::_S_max_size; } { return _Rep::_S_max_size; }
/** /**
...@@ -765,7 +765,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -765,7 +765,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* before needing to allocate more memory. * before needing to allocate more memory.
*/ */
size_type size_type
capacity() const capacity() const _GLIBCXX_NOEXCEPT
{ return _M_rep()->_M_capacity; } { return _M_rep()->_M_capacity; }
/** /**
...@@ -792,7 +792,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -792,7 +792,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* Erases the string, making it empty. * Erases the string, making it empty.
*/ */
void void
clear() clear() _GLIBCXX_NOEXCEPT
{ _M_mutate(0, this->size(), 0); } { _M_mutate(0, this->size(), 0); }
/** /**
...@@ -800,7 +800,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -800,7 +800,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* <code>*this == ""</code>. * <code>*this == ""</code>.
*/ */
bool bool
empty() const empty() const _GLIBCXX_NOEXCEPT
{ return this->size() == 0; } { return this->size() == 0; }
// Element access: // Element access:
...@@ -1763,7 +1763,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -1763,7 +1763,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* happen. * happen.
*/ */
const _CharT* const _CharT*
c_str() const c_str() const _GLIBCXX_NOEXCEPT
{ return _M_data(); } { return _M_data(); }
/** /**
...@@ -1773,14 +1773,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -1773,14 +1773,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* happen. * happen.
*/ */
const _CharT* const _CharT*
data() const data() const _GLIBCXX_NOEXCEPT
{ return _M_data(); } { return _M_data(); }
/** /**
* @brief Return copy of allocator used to construct this string. * @brief Return copy of allocator used to construct this string.
*/ */
allocator_type allocator_type
get_allocator() const get_allocator() const _GLIBCXX_NOEXCEPT
{ return _M_dataplus; } { return _M_dataplus; }
/** /**
...@@ -1809,6 +1809,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -1809,6 +1809,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
*/ */
size_type size_type
find(const basic_string& __str, size_type __pos = 0) const find(const basic_string& __str, size_type __pos = 0) const
_GLIBCXX_NOEXCEPT
{ return this->find(__str.data(), __pos, __str.size()); } { return this->find(__str.data(), __pos, __str.size()); }
/** /**
...@@ -1839,7 +1840,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -1839,7 +1840,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* returns npos. * returns npos.
*/ */
size_type size_type
find(_CharT __c, size_type __pos = 0) const; find(_CharT __c, size_type __pos = 0) const _GLIBCXX_NOEXCEPT;
/** /**
* @brief Find last position of a string. * @brief Find last position of a string.
...@@ -1853,6 +1854,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -1853,6 +1854,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
*/ */
size_type size_type
rfind(const basic_string& __str, size_type __pos = npos) const rfind(const basic_string& __str, size_type __pos = npos) const
_GLIBCXX_NOEXCEPT
{ return this->rfind(__str.data(), __pos, __str.size()); } { return this->rfind(__str.data(), __pos, __str.size()); }
/** /**
...@@ -1897,7 +1899,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -1897,7 +1899,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* returns npos. * returns npos.
*/ */
size_type size_type
rfind(_CharT __c, size_type __pos = npos) const; rfind(_CharT __c, size_type __pos = npos) const _GLIBCXX_NOEXCEPT;
/** /**
* @brief Find position of a character of string. * @brief Find position of a character of string.
...@@ -1911,6 +1913,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -1911,6 +1913,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
*/ */
size_type size_type
find_first_of(const basic_string& __str, size_type __pos = 0) const find_first_of(const basic_string& __str, size_type __pos = 0) const
_GLIBCXX_NOEXCEPT
{ return this->find_first_of(__str.data(), __pos, __str.size()); } { return this->find_first_of(__str.data(), __pos, __str.size()); }
/** /**
...@@ -1957,7 +1960,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -1957,7 +1960,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* Note: equivalent to find(c, pos). * Note: equivalent to find(c, pos).
*/ */
size_type size_type
find_first_of(_CharT __c, size_type __pos = 0) const find_first_of(_CharT __c, size_type __pos = 0) const _GLIBCXX_NOEXCEPT
{ return this->find(__c, __pos); } { return this->find(__c, __pos); }
/** /**
...@@ -1972,6 +1975,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -1972,6 +1975,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
*/ */
size_type size_type
find_last_of(const basic_string& __str, size_type __pos = npos) const find_last_of(const basic_string& __str, size_type __pos = npos) const
_GLIBCXX_NOEXCEPT
{ return this->find_last_of(__str.data(), __pos, __str.size()); } { return this->find_last_of(__str.data(), __pos, __str.size()); }
/** /**
...@@ -2018,7 +2022,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -2018,7 +2022,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* Note: equivalent to rfind(c, pos). * Note: equivalent to rfind(c, pos).
*/ */
size_type size_type
find_last_of(_CharT __c, size_type __pos = npos) const find_last_of(_CharT __c, size_type __pos = npos) const _GLIBCXX_NOEXCEPT
{ return this->rfind(__c, __pos); } { return this->rfind(__c, __pos); }
/** /**
...@@ -2033,6 +2037,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -2033,6 +2037,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
*/ */
size_type size_type
find_first_not_of(const basic_string& __str, size_type __pos = 0) const find_first_not_of(const basic_string& __str, size_type __pos = 0) const
_GLIBCXX_NOEXCEPT
{ return this->find_first_not_of(__str.data(), __pos, __str.size()); } { return this->find_first_not_of(__str.data(), __pos, __str.size()); }
/** /**
...@@ -2078,7 +2083,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -2078,7 +2083,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* If not found, returns npos. * If not found, returns npos.
*/ */
size_type size_type
find_first_not_of(_CharT __c, size_type __pos = 0) const; find_first_not_of(_CharT __c, size_type __pos = 0) const
_GLIBCXX_NOEXCEPT;
/** /**
* @brief Find last position of a character not in string. * @brief Find last position of a character not in string.
...@@ -2092,6 +2098,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -2092,6 +2098,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
*/ */
size_type size_type
find_last_not_of(const basic_string& __str, size_type __pos = npos) const find_last_not_of(const basic_string& __str, size_type __pos = npos) const
_GLIBCXX_NOEXCEPT
{ return this->find_last_not_of(__str.data(), __pos, __str.size()); } { return this->find_last_not_of(__str.data(), __pos, __str.size()); }
/** /**
...@@ -2137,7 +2144,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -2137,7 +2144,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* found. If not found, returns npos. * found. If not found, returns npos.
*/ */
size_type size_type
find_last_not_of(_CharT __c, size_type __pos = npos) const; find_last_not_of(_CharT __c, size_type __pos = npos) const
_GLIBCXX_NOEXCEPT;
/** /**
* @brief Get a substring. * @brief Get a substring.
......
...@@ -759,7 +759,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -759,7 +759,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _CharT, typename _Traits, typename _Alloc> template<typename _CharT, typename _Traits, typename _Alloc>
typename basic_string<_CharT, _Traits, _Alloc>::size_type typename basic_string<_CharT, _Traits, _Alloc>::size_type
basic_string<_CharT, _Traits, _Alloc>:: basic_string<_CharT, _Traits, _Alloc>::
find(_CharT __c, size_type __pos) const find(_CharT __c, size_type __pos) const _GLIBCXX_NOEXCEPT
{ {
size_type __ret = npos; size_type __ret = npos;
const size_type __size = this->size(); const size_type __size = this->size();
...@@ -798,7 +798,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -798,7 +798,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _CharT, typename _Traits, typename _Alloc> template<typename _CharT, typename _Traits, typename _Alloc>
typename basic_string<_CharT, _Traits, _Alloc>::size_type typename basic_string<_CharT, _Traits, _Alloc>::size_type
basic_string<_CharT, _Traits, _Alloc>:: basic_string<_CharT, _Traits, _Alloc>::
rfind(_CharT __c, size_type __pos) const rfind(_CharT __c, size_type __pos) const _GLIBCXX_NOEXCEPT
{ {
size_type __size = this->size(); size_type __size = this->size();
if (__size) if (__size)
...@@ -863,7 +863,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -863,7 +863,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _CharT, typename _Traits, typename _Alloc> template<typename _CharT, typename _Traits, typename _Alloc>
typename basic_string<_CharT, _Traits, _Alloc>::size_type typename basic_string<_CharT, _Traits, _Alloc>::size_type
basic_string<_CharT, _Traits, _Alloc>:: basic_string<_CharT, _Traits, _Alloc>::
find_first_not_of(_CharT __c, size_type __pos) const find_first_not_of(_CharT __c, size_type __pos) const _GLIBCXX_NOEXCEPT
{ {
for (; __pos < this->size(); ++__pos) for (; __pos < this->size(); ++__pos)
if (!traits_type::eq(_M_data()[__pos], __c)) if (!traits_type::eq(_M_data()[__pos], __c))
...@@ -895,7 +895,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -895,7 +895,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _CharT, typename _Traits, typename _Alloc> template<typename _CharT, typename _Traits, typename _Alloc>
typename basic_string<_CharT, _Traits, _Alloc>::size_type typename basic_string<_CharT, _Traits, _Alloc>::size_type
basic_string<_CharT, _Traits, _Alloc>:: basic_string<_CharT, _Traits, _Alloc>::
find_last_not_of(_CharT __c, size_type __pos) const find_last_not_of(_CharT __c, size_type __pos) const _GLIBCXX_NOEXCEPT
{ {
size_type __size = this->size(); size_type __size = this->size();
if (__size) if (__size)
......
// Debugging string implementation -*- C++ -*- // Debugging string implementation -*- C++ -*-
// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 // Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
// Free Software Foundation, Inc. // Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // This file is part of the GNU ISO C++ Library. This library is free
...@@ -114,7 +114,7 @@ namespace __gnu_debug ...@@ -114,7 +114,7 @@ namespace __gnu_debug
{ } { }
#ifdef __GXX_EXPERIMENTAL_CXX0X__ #ifdef __GXX_EXPERIMENTAL_CXX0X__
basic_string(basic_string&& __str) basic_string(basic_string&& __str) noexcept
: _Base(std::move(__str)) : _Base(std::move(__str))
{ } { }
...@@ -171,37 +171,55 @@ namespace __gnu_debug ...@@ -171,37 +171,55 @@ namespace __gnu_debug
// 21.3.2 iterators: // 21.3.2 iterators:
iterator iterator
begin() begin() _GLIBCXX_NOEXCEPT
{ return iterator(_Base::begin(), this); } { return iterator(_Base::begin(), this); }
const_iterator const_iterator
begin() const begin() const _GLIBCXX_NOEXCEPT
{ return const_iterator(_Base::begin(), this); } { return const_iterator(_Base::begin(), this); }
iterator iterator
end() end() _GLIBCXX_NOEXCEPT
{ return iterator(_Base::end(), this); } { return iterator(_Base::end(), this); }
const_iterator const_iterator
end() const end() const _GLIBCXX_NOEXCEPT
{ return const_iterator(_Base::end(), this); } { return const_iterator(_Base::end(), this); }
reverse_iterator reverse_iterator
rbegin() rbegin() _GLIBCXX_NOEXCEPT
{ return reverse_iterator(end()); } { return reverse_iterator(end()); }
const_reverse_iterator const_reverse_iterator
rbegin() const rbegin() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(end()); } { return const_reverse_iterator(end()); }
reverse_iterator reverse_iterator
rend() rend() _GLIBCXX_NOEXCEPT
{ return reverse_iterator(begin()); } { return reverse_iterator(begin()); }
const_reverse_iterator const_reverse_iterator
rend() const rend() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(begin()); } { return const_reverse_iterator(begin()); }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
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
// 21.3.3 capacity: // 21.3.3 capacity:
using _Base::size; using _Base::size;
using _Base::length; using _Base::length;
...@@ -226,7 +244,7 @@ namespace __gnu_debug ...@@ -226,7 +244,7 @@ namespace __gnu_debug
using _Base::reserve; using _Base::reserve;
void void
clear() clear() _GLIBCXX_NOEXCEPT
{ {
_Base::clear(); _Base::clear();
this->_M_invalidate_all(); this->_M_invalidate_all();
...@@ -672,7 +690,7 @@ namespace __gnu_debug ...@@ -672,7 +690,7 @@ namespace __gnu_debug
// 21.3.6 string operations: // 21.3.6 string operations:
const _CharT* const _CharT*
c_str() const c_str() const _GLIBCXX_NOEXCEPT
{ {
const _CharT* __res = _Base::c_str(); const _CharT* __res = _Base::c_str();
this->_M_invalidate_all(); this->_M_invalidate_all();
...@@ -680,7 +698,7 @@ namespace __gnu_debug ...@@ -680,7 +698,7 @@ namespace __gnu_debug
} }
const _CharT* const _CharT*
data() const data() const _GLIBCXX_NOEXCEPT
{ {
const _CharT* __res = _Base::data(); const _CharT* __res = _Base::data();
this->_M_invalidate_all(); this->_M_invalidate_all();
...@@ -691,6 +709,7 @@ namespace __gnu_debug ...@@ -691,6 +709,7 @@ namespace __gnu_debug
size_type size_type
find(const basic_string& __str, size_type __pos = 0) const find(const basic_string& __str, size_type __pos = 0) const
_GLIBCXX_NOEXCEPT
{ return _Base::find(__str, __pos); } { return _Base::find(__str, __pos); }
size_type size_type
...@@ -708,11 +727,12 @@ namespace __gnu_debug ...@@ -708,11 +727,12 @@ namespace __gnu_debug
} }
size_type size_type
find(_CharT __c, size_type __pos = 0) const find(_CharT __c, size_type __pos = 0) const _GLIBCXX_NOEXCEPT
{ return _Base::find(__c, __pos); } { return _Base::find(__c, __pos); }
size_type size_type
rfind(const basic_string& __str, size_type __pos = _Base::npos) const rfind(const basic_string& __str, size_type __pos = _Base::npos) const
_GLIBCXX_NOEXCEPT
{ return _Base::rfind(__str, __pos); } { return _Base::rfind(__str, __pos); }
size_type size_type
...@@ -730,11 +750,12 @@ namespace __gnu_debug ...@@ -730,11 +750,12 @@ namespace __gnu_debug
} }
size_type size_type
rfind(_CharT __c, size_type __pos = _Base::npos) const rfind(_CharT __c, size_type __pos = _Base::npos) const _GLIBCXX_NOEXCEPT
{ return _Base::rfind(__c, __pos); } { return _Base::rfind(__c, __pos); }
size_type size_type
find_first_of(const basic_string& __str, size_type __pos = 0) const find_first_of(const basic_string& __str, size_type __pos = 0) const
_GLIBCXX_NOEXCEPT
{ return _Base::find_first_of(__str, __pos); } { return _Base::find_first_of(__str, __pos); }
size_type size_type
...@@ -752,12 +773,12 @@ namespace __gnu_debug ...@@ -752,12 +773,12 @@ namespace __gnu_debug
} }
size_type size_type
find_first_of(_CharT __c, size_type __pos = 0) const find_first_of(_CharT __c, size_type __pos = 0) const _GLIBCXX_NOEXCEPT
{ return _Base::find_first_of(__c, __pos); } { return _Base::find_first_of(__c, __pos); }
size_type size_type
find_last_of(const basic_string& __str, find_last_of(const basic_string& __str,
size_type __pos = _Base::npos) const size_type __pos = _Base::npos) const _GLIBCXX_NOEXCEPT
{ return _Base::find_last_of(__str, __pos); } { return _Base::find_last_of(__str, __pos); }
size_type size_type
...@@ -776,10 +797,12 @@ namespace __gnu_debug ...@@ -776,10 +797,12 @@ namespace __gnu_debug
size_type size_type
find_last_of(_CharT __c, size_type __pos = _Base::npos) const find_last_of(_CharT __c, size_type __pos = _Base::npos) const
_GLIBCXX_NOEXCEPT
{ return _Base::find_last_of(__c, __pos); } { return _Base::find_last_of(__c, __pos); }
size_type size_type
find_first_not_of(const basic_string& __str, size_type __pos = 0) const find_first_not_of(const basic_string& __str, size_type __pos = 0) const
_GLIBCXX_NOEXCEPT
{ return _Base::find_first_not_of(__str, __pos); } { return _Base::find_first_not_of(__str, __pos); }
size_type size_type
...@@ -797,12 +820,13 @@ namespace __gnu_debug ...@@ -797,12 +820,13 @@ namespace __gnu_debug
} }
size_type size_type
find_first_not_of(_CharT __c, size_type __pos = 0) const find_first_not_of(_CharT __c, size_type __pos = 0) const _GLIBCXX_NOEXCEPT
{ return _Base::find_first_not_of(__c, __pos); } { return _Base::find_first_not_of(__c, __pos); }
size_type size_type
find_last_not_of(const basic_string& __str, find_last_not_of(const basic_string& __str,
size_type __pos = _Base::npos) const size_type __pos = _Base::npos) const
_GLIBCXX_NOEXCEPT
{ return _Base::find_last_not_of(__str, __pos); } { return _Base::find_last_not_of(__str, __pos); }
size_type size_type
...@@ -821,6 +845,7 @@ namespace __gnu_debug ...@@ -821,6 +845,7 @@ namespace __gnu_debug
size_type size_type
find_last_not_of(_CharT __c, size_type __pos = _Base::npos) const find_last_not_of(_CharT __c, size_type __pos = _Base::npos) const
_GLIBCXX_NOEXCEPT
{ return _Base::find_last_not_of(__c, __pos); } { return _Base::find_last_not_of(__c, __pos); }
basic_string basic_string
...@@ -868,10 +893,10 @@ namespace __gnu_debug ...@@ -868,10 +893,10 @@ namespace __gnu_debug
} }
_Base& _Base&
_M_base() { return *this; } _M_base() _GLIBCXX_NOEXCEPT { return *this; }
const _Base& const _Base&
_M_base() const { return *this; } _M_base() const _GLIBCXX_NOEXCEPT { return *this; }
using _Safe_base::_M_invalidate_all; using _Safe_base::_M_invalidate_all;
}; };
......
...@@ -156,7 +156,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -156,7 +156,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* @a str. The contents of @a str are a valid, but unspecified * @a str. The contents of @a str are a valid, but unspecified
* string. * string.
*/ */
__versa_string(__versa_string&& __str) __versa_string(__versa_string&& __str) noexcept
: __vstring_base(std::move(__str)) { } : __vstring_base(std::move(__str)) { }
/** /**
...@@ -309,7 +309,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -309,7 +309,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* the %string. Unshares the string. * the %string. Unshares the string.
*/ */
iterator iterator
begin() begin() _GLIBCXX_NOEXCEPT
{ {
this->_M_leak(); this->_M_leak();
return iterator(this->_M_data()); return iterator(this->_M_data());
...@@ -320,7 +320,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -320,7 +320,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* character in the %string. * character in the %string.
*/ */
const_iterator const_iterator
begin() const begin() const _GLIBCXX_NOEXCEPT
{ return const_iterator(this->_M_data()); } { return const_iterator(this->_M_data()); }
/** /**
...@@ -328,7 +328,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -328,7 +328,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* character in the %string. Unshares the string. * character in the %string. Unshares the string.
*/ */
iterator iterator
end() end() _GLIBCXX_NOEXCEPT
{ {
this->_M_leak(); this->_M_leak();
return iterator(this->_M_data() + this->size()); return iterator(this->_M_data() + this->size());
...@@ -339,7 +339,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -339,7 +339,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* last character in the %string. * last character in the %string.
*/ */
const_iterator const_iterator
end() const end() const _GLIBCXX_NOEXCEPT
{ return const_iterator(this->_M_data() + this->size()); } { return const_iterator(this->_M_data() + this->size()); }
/** /**
...@@ -348,7 +348,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -348,7 +348,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* order. Unshares the string. * order. Unshares the string.
*/ */
reverse_iterator reverse_iterator
rbegin() rbegin() _GLIBCXX_NOEXCEPT
{ return reverse_iterator(this->end()); } { return reverse_iterator(this->end()); }
/** /**
...@@ -357,7 +357,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -357,7 +357,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* reverse element order. * reverse element order.
*/ */
const_reverse_iterator const_reverse_iterator
rbegin() const rbegin() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(this->end()); } { return const_reverse_iterator(this->end()); }
/** /**
...@@ -366,7 +366,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -366,7 +366,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* element order. Unshares the string. * element order. Unshares the string.
*/ */
reverse_iterator reverse_iterator
rend() rend() _GLIBCXX_NOEXCEPT
{ return reverse_iterator(this->begin()); } { return reverse_iterator(this->begin()); }
/** /**
...@@ -375,7 +375,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -375,7 +375,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* is done in reverse element order. * is done in reverse element order.
*/ */
const_reverse_iterator const_reverse_iterator
rend() const rend() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(this->begin()); } { return const_reverse_iterator(this->begin()); }
#ifdef __GXX_EXPERIMENTAL_CXX0X__ #ifdef __GXX_EXPERIMENTAL_CXX0X__
...@@ -384,7 +384,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -384,7 +384,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* character in the %string. * character in the %string.
*/ */
const_iterator const_iterator
cbegin() const cbegin() const noexcept
{ return const_iterator(this->_M_data()); } { return const_iterator(this->_M_data()); }
/** /**
...@@ -392,7 +392,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -392,7 +392,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* last character in the %string. * last character in the %string.
*/ */
const_iterator const_iterator
cend() const cend() const noexcept
{ return const_iterator(this->_M_data() + this->size()); } { return const_iterator(this->_M_data() + this->size()); }
/** /**
...@@ -401,7 +401,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -401,7 +401,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* reverse element order. * reverse element order.
*/ */
const_reverse_iterator const_reverse_iterator
crbegin() const crbegin() const noexcept
{ return const_reverse_iterator(this->end()); } { return const_reverse_iterator(this->end()); }
/** /**
...@@ -410,7 +410,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -410,7 +410,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* is done in reverse element order. * is done in reverse element order.
*/ */
const_reverse_iterator const_reverse_iterator
crend() const crend() const noexcept
{ return const_reverse_iterator(this->begin()); } { return const_reverse_iterator(this->begin()); }
#endif #endif
...@@ -419,18 +419,18 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -419,18 +419,18 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
/// Returns the number of characters in the string, not including any /// Returns the number of characters in the string, not including any
/// null-termination. /// null-termination.
size_type size_type
size() const size() const _GLIBCXX_NOEXCEPT
{ return this->_M_length(); } { return this->_M_length(); }
/// Returns the number of characters in the string, not including any /// Returns the number of characters in the string, not including any
/// null-termination. /// null-termination.
size_type size_type
length() const length() const _GLIBCXX_NOEXCEPT
{ return this->_M_length(); } { return this->_M_length(); }
/// Returns the size() of the largest possible %string. /// Returns the size() of the largest possible %string.
size_type size_type
max_size() const max_size() const _GLIBCXX_NOEXCEPT
{ return this->_M_max_size(); } { return this->_M_max_size(); }
/** /**
...@@ -477,7 +477,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -477,7 +477,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* hold before needing to allocate more memory. * hold before needing to allocate more memory.
*/ */
size_type size_type
capacity() const capacity() const _GLIBCXX_NOEXCEPT
{ return this->_M_capacity(); } { return this->_M_capacity(); }
/** /**
...@@ -505,7 +505,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -505,7 +505,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* Erases the string, making it empty. * Erases the string, making it empty.
*/ */
void void
clear() clear() _GLIBCXX_NOEXCEPT
{ this->_M_clear(); } { this->_M_clear(); }
/** /**
...@@ -513,7 +513,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -513,7 +513,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* <code>*this == ""</code>. * <code>*this == ""</code>.
*/ */
bool bool
empty() const empty() const _GLIBCXX_NOEXCEPT
{ return this->size() == 0; } { return this->size() == 0; }
// Element access: // Element access:
...@@ -1484,7 +1484,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -1484,7 +1484,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* happen. * happen.
*/ */
const _CharT* const _CharT*
c_str() const c_str() const _GLIBCXX_NOEXCEPT
{ return this->_M_data(); } { return this->_M_data(); }
/** /**
...@@ -1494,14 +1494,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -1494,14 +1494,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* happen. * happen.
*/ */
const _CharT* const _CharT*
data() const data() const _GLIBCXX_NOEXCEPT
{ return this->_M_data(); } { return this->_M_data(); }
/** /**
* @brief Return copy of allocator used to construct this string. * @brief Return copy of allocator used to construct this string.
*/ */
allocator_type allocator_type
get_allocator() const get_allocator() const _GLIBCXX_NOEXCEPT
{ return allocator_type(this->_M_get_allocator()); } { return allocator_type(this->_M_get_allocator()); }
/** /**
...@@ -1531,6 +1531,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -1531,6 +1531,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
*/ */
size_type size_type
find(const __versa_string& __str, size_type __pos = 0) const find(const __versa_string& __str, size_type __pos = 0) const
_GLIBCXX_NOEXCEPT
{ return this->find(__str.data(), __pos, __str.size()); } { return this->find(__str.data(), __pos, __str.size()); }
/** /**
...@@ -1561,7 +1562,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -1561,7 +1562,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* found. If not found, returns npos. * found. If not found, returns npos.
*/ */
size_type size_type
find(_CharT __c, size_type __pos = 0) const; find(_CharT __c, size_type __pos = 0) const _GLIBCXX_NOEXCEPT;
/** /**
* @brief Find last position of a string. * @brief Find last position of a string.
...@@ -1575,6 +1576,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -1575,6 +1576,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
*/ */
size_type size_type
rfind(const __versa_string& __str, size_type __pos = npos) const rfind(const __versa_string& __str, size_type __pos = npos) const
_GLIBCXX_NOEXCEPT
{ return this->rfind(__str.data(), __pos, __str.size()); } { return this->rfind(__str.data(), __pos, __str.size()); }
/** /**
...@@ -1620,7 +1622,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -1620,7 +1622,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* found. If not found, returns npos. * found. If not found, returns npos.
*/ */
size_type size_type
rfind(_CharT __c, size_type __pos = npos) const; rfind(_CharT __c, size_type __pos = npos) const _GLIBCXX_NOEXCEPT;
/** /**
* @brief Find position of a character of string. * @brief Find position of a character of string.
...@@ -1634,6 +1636,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -1634,6 +1636,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
*/ */
size_type size_type
find_first_of(const __versa_string& __str, size_type __pos = 0) const find_first_of(const __versa_string& __str, size_type __pos = 0) const
_GLIBCXX_NOEXCEPT
{ return this->find_first_of(__str.data(), __pos, __str.size()); } { return this->find_first_of(__str.data(), __pos, __str.size()); }
/** /**
...@@ -1681,7 +1684,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -1681,7 +1684,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* Note: equivalent to find(c, pos). * Note: equivalent to find(c, pos).
*/ */
size_type size_type
find_first_of(_CharT __c, size_type __pos = 0) const find_first_of(_CharT __c, size_type __pos = 0) const _GLIBCXX_NOEXCEPT
{ return this->find(__c, __pos); } { return this->find(__c, __pos); }
/** /**
...@@ -1697,6 +1700,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -1697,6 +1700,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
*/ */
size_type size_type
find_last_of(const __versa_string& __str, size_type __pos = npos) const find_last_of(const __versa_string& __str, size_type __pos = npos) const
_GLIBCXX_NOEXCEPT
{ return this->find_last_of(__str.data(), __pos, __str.size()); } { return this->find_last_of(__str.data(), __pos, __str.size()); }
/** /**
...@@ -1744,7 +1748,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -1744,7 +1748,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* Note: equivalent to rfind(c, pos). * Note: equivalent to rfind(c, pos).
*/ */
size_type size_type
find_last_of(_CharT __c, size_type __pos = npos) const find_last_of(_CharT __c, size_type __pos = npos) const _GLIBCXX_NOEXCEPT
{ return this->rfind(__c, __pos); } { return this->rfind(__c, __pos); }
/** /**
...@@ -1759,6 +1763,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -1759,6 +1763,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
*/ */
size_type size_type
find_first_not_of(const __versa_string& __str, size_type __pos = 0) const find_first_not_of(const __versa_string& __str, size_type __pos = 0) const
_GLIBCXX_NOEXCEPT
{ return this->find_first_not_of(__str.data(), __pos, __str.size()); } { return this->find_first_not_of(__str.data(), __pos, __str.size()); }
/** /**
...@@ -1805,7 +1810,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -1805,7 +1810,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* index where it was found. If not found, returns npos. * index where it was found. If not found, returns npos.
*/ */
size_type size_type
find_first_not_of(_CharT __c, size_type __pos = 0) const; find_first_not_of(_CharT __c, size_type __pos = 0) const
_GLIBCXX_NOEXCEPT;
/** /**
* @brief Find last position of a character not in string. * @brief Find last position of a character not in string.
...@@ -1820,7 +1826,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -1820,7 +1826,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
*/ */
size_type size_type
find_last_not_of(const __versa_string& __str, find_last_not_of(const __versa_string& __str,
size_type __pos = npos) const size_type __pos = npos) const _GLIBCXX_NOEXCEPT
{ return this->find_last_not_of(__str.data(), __pos, __str.size()); } { return this->find_last_not_of(__str.data(), __pos, __str.size()); }
/** /**
...@@ -1867,7 +1873,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -1867,7 +1873,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* index where it was found. If not found, returns npos. * index where it was found. If not found, returns npos.
*/ */
size_type size_type
find_last_not_of(_CharT __c, size_type __pos = npos) const; find_last_not_of(_CharT __c, size_type __pos = npos) const
_GLIBCXX_NOEXCEPT;
/** /**
* @brief Get a substring. * @brief Get a substring.
......
...@@ -291,7 +291,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -291,7 +291,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template <typename, typename, typename> class _Base> template <typename, typename, typename> class _Base>
typename __versa_string<_CharT, _Traits, _Alloc, _Base>::size_type typename __versa_string<_CharT, _Traits, _Alloc, _Base>::size_type
__versa_string<_CharT, _Traits, _Alloc, _Base>:: __versa_string<_CharT, _Traits, _Alloc, _Base>::
find(_CharT __c, size_type __pos) const find(_CharT __c, size_type __pos) const _GLIBCXX_NOEXCEPT
{ {
size_type __ret = npos; size_type __ret = npos;
const size_type __size = this->size(); const size_type __size = this->size();
...@@ -332,7 +332,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -332,7 +332,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template <typename, typename, typename> class _Base> template <typename, typename, typename> class _Base>
typename __versa_string<_CharT, _Traits, _Alloc, _Base>::size_type typename __versa_string<_CharT, _Traits, _Alloc, _Base>::size_type
__versa_string<_CharT, _Traits, _Alloc, _Base>:: __versa_string<_CharT, _Traits, _Alloc, _Base>::
rfind(_CharT __c, size_type __pos) const rfind(_CharT __c, size_type __pos) const _GLIBCXX_NOEXCEPT
{ {
size_type __size = this->size(); size_type __size = this->size();
if (__size) if (__size)
...@@ -402,7 +402,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -402,7 +402,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template <typename, typename, typename> class _Base> template <typename, typename, typename> class _Base>
typename __versa_string<_CharT, _Traits, _Alloc, _Base>::size_type typename __versa_string<_CharT, _Traits, _Alloc, _Base>::size_type
__versa_string<_CharT, _Traits, _Alloc, _Base>:: __versa_string<_CharT, _Traits, _Alloc, _Base>::
find_first_not_of(_CharT __c, size_type __pos) const find_first_not_of(_CharT __c, size_type __pos) const _GLIBCXX_NOEXCEPT
{ {
for (; __pos < this->size(); ++__pos) for (; __pos < this->size(); ++__pos)
if (!traits_type::eq(this->_M_data()[__pos], __c)) if (!traits_type::eq(this->_M_data()[__pos], __c))
...@@ -436,7 +436,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -436,7 +436,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template <typename, typename, typename> class _Base> template <typename, typename, typename> class _Base>
typename __versa_string<_CharT, _Traits, _Alloc, _Base>::size_type typename __versa_string<_CharT, _Traits, _Alloc, _Base>::size_type
__versa_string<_CharT, _Traits, _Alloc, _Base>:: __versa_string<_CharT, _Traits, _Alloc, _Base>::
find_last_not_of(_CharT __c, size_type __pos) const find_last_not_of(_CharT __c, size_type __pos) const _GLIBCXX_NOEXCEPT
{ {
size_type __size = this->size(); size_type __size = this->size();
if (__size) if (__size)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment