From 21bf6b2a938864cac3f973755f8a581e4134092d Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Thu, 23 Aug 2018 12:21:17 +0100 Subject: [PATCH] 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. From-SVN: r263809 --- libstdc++-v3/ChangeLog | 4 ++++ libstdc++-v3/include/debug/string | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 54b8a2f1782..02dce1aad9f 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,9 @@ 2018-08-23 Jonathan Wakely + * 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. + * 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 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