From: Jonathan Wakely Date: Tue, 11 Oct 2016 10:33:41 +0000 (+0100) Subject: Optimise std::list::assign(initializer_list) slightly X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4bb4acee6878e291e3972feb6dcd154bce915190;p=gcc.git Optimise std::list::assign(initializer_list) slightly * include/bits/stl_list.h (assign(initializer_list)): Call _M_assign_dispatch directly with correct tag. From-SVN: r240984 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index eb68cbf5320..cf51dd7dd3b 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,8 @@ 2016-10-11 Jonathan Wakely + * include/bits/stl_list.h (assign(initializer_list)): 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. diff --git a/libstdc++-v3/include/bits/stl_list.h b/libstdc++-v3/include/bits/stl_list.h index 40e2d1862c4..87c8a393d7c 100644 --- a/libstdc++-v3/include/bits/stl_list.h +++ b/libstdc++-v3/include/bits/stl_list.h @@ -830,7 +830,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 */ void assign(initializer_list __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.