Make basic_string::replace forward to different overload
authorJonathan Wakely <jwakely@redhat.com>
Wed, 13 Jul 2016 17:22:51 +0000 (18:22 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 13 Jul 2016 17:22:51 +0000 (18:22 +0100)
* include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
(replace(__const_iterator, __const_iterator, initializer_list<C>)):
Forward to different overload.

From-SVN: r238306

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/basic_string.h

index f5246fe057741c8f9a7b27eece5821c04cb6087c..a9e5b22bfdab78f1461b7fe0149e6f37c9fbc6b9 100644 (file)
@@ -1,5 +1,9 @@
 2016-07-13  Jonathan Wakely  <jwakely@redhat.com>
 
+       * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
+       (replace(__const_iterator, __const_iterator, initializer_list<C>)):
+       Forward to different overload.
+
        * include/bits/allocated_ptr.h (__allocated_ptr::_S_raw_ptr): Make
        static.
 
index 374c9851539d379bdaf0c308a2c154cc987349e7..60e1dbfb5ccf4e7defc03d0cbb9e73c429c6ebee 100644 (file)
@@ -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: