50bb46e4d2
Fix and complete __gnu_debug::basic_string so that it can be used as a transparent replacement of std::basic_string. libstdc++-v3/ChangeLog: * include/debug/string (basic_string(const basic_string&, const _Alloc&)): Define even if !_GLIBCXX_USE_CXX11_ABI. (basic_string(basic_string&&, const _Alloc&)): Likewise and add noexcept qualification. (basic_string<>::erase): Adapt to take __const_iterator. (basic_string(const _CharT*, const _Allocator&)): Remove assign call. (basic_string<>::insert(const_iterator, _InputIte, _InputIte)): Try to remove iterator debug layer even if !_GLIBCXX_USE_CXX11_ABI. [_GLIBCXX_USE_CHAR8_T] (__gnu_debug::u8string): New. (__gnu_debug::u16string, __gnu_debug::u32string): New. (std::hash<__gnu_debug::basic_string<>>): New partial specialization. (std::__is_fast_hash<__gnu_debug::basic_string<>>): Likewise. * testsuite/util/exception/safety.h (erase_base<__gnu_debug::basic_string<>>): New partial specialization. (insert_base<__gnu_debug::basic_string<>>): Likewise. * testsuite/util/testsuite_container_traits.h (traits<__gnu_debug::basic_string<>>): New partial specialization. * testsuite/21_strings/basic_string/hash/debug.cc: New test. * testsuite/21_strings/basic_string/requirements/citerators.cc: Add test on __gnu_debug::string. * testsuite/21_strings/basic_string/requirements/dr438/constructor.cc: Likewise. * testsuite/21_strings/basic_string/requirements/exception/basic.cc: Likewise. * testsuite/21_strings/basic_string/requirements/exception/generation_prohibited.cc: Likewise. * testsuite/21_strings/basic_string/requirements/exception/propagation_consistent.cc: Likewise. * testsuite/21_strings/basic_string/requirements/explicit_instantiation/char/1.cc: Likewise. * testsuite/21_strings/basic_string/requirements/explicit_instantiation/char16_t/1.cc: Likewise. * testsuite/21_strings/basic_string/requirements/explicit_instantiation/char32_t/1.cc: Likewise. * testsuite/21_strings/basic_string/requirements/explicit_instantiation/char8_t/1.cc: Likewise. * testsuite/21_strings/basic_string/requirements/explicit_instantiation/wchar_t/1.cc: Likewise. * testsuite/21_strings/basic_string/requirements/typedefs.cc: Likewise. |
||
---|---|---|
.. | ||
safety.h |