Commit 21bf6b2a by Jonathan Wakely Committed by Jonathan Wakely

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
parent 3eb1eda1
2018-08-23 Jonathan Wakely <jwakely@redhat.com> 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] * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
(basic_string::__const_iterator): Change access to protected. (basic_string::__const_iterator): Change access to protected.
[!_GLIBCXX_USE_CXX11_ABI] (basic_string::__const_iterator): Define [!_GLIBCXX_USE_CXX11_ABI] (basic_string::__const_iterator): Define
......
...@@ -642,7 +642,7 @@ namespace __gnu_debug ...@@ -642,7 +642,7 @@ namespace __gnu_debug
else else
__res = _Base::insert(__p.base(), __first, __last); __res = _Base::insert(__p.base(), __first, __last);
#else #else
const size_type __offset = __p.base() - _Base::cbegin(); const size_type __offset = __p.base() - _Base::begin();
_Base::insert(__p.base(), __first, __last); _Base::insert(__p.base(), __first, __last);
__res = _Base::begin() + __offset; __res = _Base::begin() + __offset;
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment