mirror of
https://github.com/boostorg/container.git
synced 2025-08-02 14:04:26 +02:00
Fix emplace_back return type also in compilers without variadic templates. Update changelog.
This commit is contained in:
@@ -1217,8 +1217,9 @@ use [*Boost.Container]? There are several reasons for that:
|
||||
[section:release_notes_boost_1_64_00 Boost 1.64 Release]
|
||||
|
||||
* Fixed bugs:
|
||||
* [@https://svn.boost.org/trac/boost/ticket/12749 Trac #12749: ['"container::pmr::polymorphic_allocator compilation error"]].
|
||||
* [@https://svn.boost.org/trac/boost/ticket/11333 Trac #11333: ['"boost::basic_string_ref should interop with boost::container::basic_string"]].
|
||||
* [@https://svn.boost.org/trac/boost/ticket/12749 Trac #12749: ['"container::pmr::polymorphic_allocator compilation error"]].
|
||||
* [@https://svn.boost.org/trac/boost/ticket/11333 Trac #11333: ['"boost::basic_string_ref should interop with boost::container::basic_string"]].
|
||||
* [@https://github.com/boostorg/container/pull/45 GitHub #45: ['"emplace_back must return reference to back(), not to *end()"]].
|
||||
|
||||
[endsect]
|
||||
|
||||
|
@@ -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;\
|
||||
|
Reference in New Issue
Block a user