Fix C++11-ism in C++98 member function
authorJonathan Wakely <jwakely@redhat.com>
Thu, 23 Aug 2018 11:21:17 +0000 (12:21 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 23 Aug 2018 11:21:17 +0000 (12:21 +0100)
* 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
libstdc++-v3/include/debug/string

index 54b8a2f17826ed4530d569185891071c07549786..02dce1aad9f272df75977f4e2f2d9a45d904049f 100644 (file)
@@ -1,5 +1,9 @@
 2018-08-23  Jonathan Wakely  <jwakely@redhat.com>
 
+       * 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
index d330bfd5a3fa9af676af07874049676e51c166b7..ca190fa65281d30ff22c7067c3111dc71ad2561e 100644 (file)
@@ -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