Fix emplace_back return type also in compilers without variadic templates. Update changelog.

This commit is contained in:
Ion Gaztañaga
2017-02-24 22:07:20 +01:00
parent a15e85d4db
commit 1261ac3308
2 changed files with 5 additions and 3 deletions

View File

@@ -1794,10 +1794,11 @@ class vector
BOOST_CONTAINER_FORCEINLINE reference emplace_back(BOOST_MOVE_UREF##N)\
{\
if (BOOST_LIKELY(this->room_enough())){\
T* const p = this->priv_raw_end();\
allocator_traits_type::construct (this->m_holder.alloc()\
, this->priv_raw_end() BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
++this->m_holder.m_size;\
return *this->priv_raw_end();\
return *p;\
}\
else{\
typedef container_detail::insert_emplace_proxy_arg##N<Allocator, T* BOOST_MOVE_I##N BOOST_MOVE_TARG##N> type;\