aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2016-10-11 11:33:41 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2016-10-11 11:33:41 +0100
commit4bb4acee6878e291e3972feb6dcd154bce915190 (patch)
tree8364dc09affff8c193c7d54382995b6c1a109bc6
parent0470fad0d6c2b993e6f9906dc2d17303944dcc14 (diff)
downloadgcc-4bb4acee6878e291e3972feb6dcd154bce915190.zip
gcc-4bb4acee6878e291e3972feb6dcd154bce915190.tar.gz
gcc-4bb4acee6878e291e3972feb6dcd154bce915190.tar.bz2
Optimise std::list::assign(initializer_list<T>) slightly
* include/bits/stl_list.h (assign(initializer_list<value_type>)): Call _M_assign_dispatch directly with correct tag. From-SVN: r240984
-rw-r--r--libstdc++-v3/ChangeLog3
-rw-r--r--libstdc++-v3/include/bits/stl_list.h2
2 files changed, 4 insertions, 1 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index eb68cbf..cf51dd7 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -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.
diff --git a/libstdc++-v3/include/bits/stl_list.h b/libstdc++-v3/include/bits/stl_list.h
index 40e2d18..87c8a39 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<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.