From 76fcab1a091580f177b4a8d754fcca6d0a07bbfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Sat, 20 Sep 2014 17:30:09 +0200 Subject: [PATCH] Use emplace instead or push_back in priv_insert_ordered_range --- include/boost/container/detail/flat_tree.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/boost/container/detail/flat_tree.hpp b/include/boost/container/detail/flat_tree.hpp index d3d45af..36130b7 100644 --- a/include/boost/container/detail/flat_tree.hpp +++ b/include/boost/container/detail/flat_tree.hpp @@ -983,7 +983,9 @@ class flat_tree BidirIt next(first); ++next; if(next == last || val_cmp(*first, *next)){ - this->m_data.m_vect.push_back(*first); + const bool room = this->m_data.m_vect.stable_emplace_back(*first); + (void)room; + BOOST_ASSERT(room); } first = next; }