Optimise std::list::assign(initializer_list<T>) slightly
authorJonathan Wakely <jwakely@redhat.com>
Tue, 11 Oct 2016 10:33:41 +0000 (11:33 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Tue, 11 Oct 2016 10:33:41 +0000 (11:33 +0100)
* include/bits/stl_list.h (assign(initializer_list<value_type>)): Call
_M_assign_dispatch directly with correct tag.

From-SVN: r240984

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

index eb68cbf53206394f391d5d8b371216368ad87302..cf51dd7dd3b82aa823dacbe99fac165e545c0c3d 100644 (file)
@@ -1,5 +1,8 @@
 2016-10-11  Jonathan Wakely  <jwakely@redhat.com>
 
+       * include/bits/stl_list.h (assign(initializer_list<value_type>)): Call
+       _M_assign_dispatch directly with correct tag.
+
        * doc/xml/manual/intro.xml: Document LWG 2484 status.
        * libsupc++/nested_exception.h (_Throw_with_nested_impl)
        (_Throw_with_nested_helper): Remove.
index 40e2d1862c4d20685ad634ca30adde86abbaa2b3..87c8a393d7c8f1eb04353033aa47ab53f7b40e7f 100644 (file)
@@ -830,7 +830,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
        */
       void
       assign(initializer_list<value_type> __l)
-      { this->assign(__l.begin(), __l.end()); }
+      { this->_M_assign_dispatch(__l.begin(), __l.end(), __false_type()); }
 #endif
 
       /// Get a copy of the memory allocation object.