On 23/08/18 11:52 +0100, Jonathan Wakely wrote:
On 23/08/18 10:03 +0100, Jonathan Wakely wrote:
On 23/08/18 09:24 +0100, Jonathan Wakely wrote:
--- a/libstdc++-v3/testsuite/21_strings/basic_string/init-list.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/init-list.cc
@@ -17,6 +17,7 @@
//
// { dg-do run { target c++11 } }
+// { dg-require-effective-target cxx11-abi }
Actually I shouldn't have added it here. It only depends on the new
string when compiled with _GLIBCXX_DEBUG, and that should be fixed in
__gnu_debug::string not by skipping the test.
Like so.
And one more tweak, for C++98 mode.
Tested x86_64-linux, committed to trunk.
commit e2fdd7cb9553a4430d04089db0849737a88bddee
Author: Jonathan Wakely <jwak...@redhat.com>
Date: Thu Aug 23 12:20:55 2018 +0100
Fix C++11-ism in C++98 member function
* include/debug/string (insert(__const_iterator, _InIter, _InIter)):
[!_GLIBCXX_USE_CXX11_ABI]: Replace use of C++11-only cbegin() with
begin(), for C++98 compatibility.
diff --git a/libstdc++-v3/include/debug/string b/libstdc++-v3/include/debug/string
index d330bfd5a3f..ca190fa6528 100644
--- a/libstdc++-v3/include/debug/string
+++ b/libstdc++-v3/include/debug/string
@@ -642,7 +642,7 @@ namespace __gnu_debug
else
__res = _Base::insert(__p.base(), __first, __last);
#else
- const size_type __offset = __p.base() - _Base::cbegin();
+ const size_type __offset = __p.base() - _Base::begin();
_Base::insert(__p.base(), __first, __last);
__res = _Base::begin() + __offset;
#endif