From 17f8dc9367493b5bd97d67c40de8c13041393891 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Wed, 13 Jul 2016 18:22:51 +0100 Subject: [PATCH] Make basic_string::replace forward to different overload * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI] (replace(__const_iterator, __const_iterator, initializer_list)): Forward to different overload. From-SVN: r238306 --- libstdc++-v3/ChangeLog | 4 ++++ libstdc++-v3/include/bits/basic_string.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index f5246fe0577..a9e5b22bfda 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,9 @@ 2016-07-13 Jonathan Wakely + * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI] + (replace(__const_iterator, __const_iterator, initializer_list)): + Forward to different overload. + * include/bits/allocated_ptr.h (__allocated_ptr::_S_raw_ptr): Make static. diff --git a/libstdc++-v3/include/bits/basic_string.h b/libstdc++-v3/include/bits/basic_string.h index 374c9851539..60e1dbfb5cc 100644 --- a/libstdc++-v3/include/bits/basic_string.h +++ b/libstdc++-v3/include/bits/basic_string.h @@ -1912,7 +1912,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 */ basic_string& replace(const_iterator __i1, const_iterator __i2, initializer_list<_CharT> __l) - { return this->replace(__i1, __i2, __l.begin(), __l.end()); } + { return this->replace(__i1, __i2, __l.begin(), __l.size()); } #endif // C++11 private: -- 2.30.2