The __gnu_debug string (mostly) implements the C++11 API, but when it wraps the old COW string many of the member functions in the base class have the wrong parameter types or return types. This makes the __gnu_debug::string type adapt itself to the base class API. This actually makes the debug string slightly more conforming than the underlying string type when using the old ABI. * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI] (basic_string::__const_iterator): Change access to protected. [!_GLIBCXX_USE_CXX11_ABI] (basic_string::__const_iterator): Define as typedef for iterator. * include/debug/string (__const_iterator): Use typedef from base. (insert(const_iterator, _CharT)) (replace(const_iterator, const_iterator, const basic_string&)) (replace(const_iterator, const_iterator, const _CharT*, size_type)) (replace(const_iterator, const_iterator, const CharT*)) (replace(const_iterator, const_iterator, size_type, _CharT)) (replace(const_iterator, const_iterator, _InputIter, _InputIter)) (replace(const_iterator, const_iterator, initializer_list<_CharT>)): Change const_iterator parameters to __const_iterator. (insert(iterator, size_type, _CharT)): Add C++98 overload. (insert(const_iterator, _InputIterator, _InputIterator)): Change const_iterator parameter to __const_iterator. [!_GLIBCXX_USE_CXX11_ABI]: Add workaround for incorrect return type of base's member function. (insert(const_iterator, size_type, _CharT)) [!_GLIBCXX_USE_CXX11_ABI]: Likewise. (insert(const_iterator, initializer_list<_CharT>)) [!_GLIBCXX_USE_CXX11_ABI]: Likewise. * testsuite/21_strings/basic_string/init-list.cc: Remove effective target directive. From-SVN: r263808
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
array | Loading commit data... | |
assertions.h | Loading commit data... | |
bitset | Loading commit data... | |
debug.h | Loading commit data... | |
deque | Loading commit data... | |
formatter.h | Loading commit data... | |
forward_list | Loading commit data... | |
functions.h | Loading commit data... | |
helper_functions.h | Loading commit data... | |
list | Loading commit data... | |
macros.h | Loading commit data... | |
map | Loading commit data... | |
map.h | Loading commit data... | |
multimap.h | Loading commit data... | |
multiset.h | Loading commit data... | |
safe_base.h | Loading commit data... | |
safe_container.h | Loading commit data... | |
safe_iterator.h | Loading commit data... | |
safe_iterator.tcc | Loading commit data... | |
safe_local_iterator.h | Loading commit data... | |
safe_local_iterator.tcc | Loading commit data... | |
safe_sequence.h | Loading commit data... | |
safe_sequence.tcc | Loading commit data... | |
safe_unordered_base.h | Loading commit data... | |
safe_unordered_container.h | Loading commit data... | |
safe_unordered_container.tcc | Loading commit data... | |
set | Loading commit data... | |
set.h | Loading commit data... | |
stl_iterator.h | Loading commit data... | |
string | Loading commit data... | |
unordered_map | Loading commit data... | |
unordered_set | Loading commit data... | |
vector | Loading commit data... |