From 099966e1cfffcaac64db3a957b51d3b18c500643 Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Sun, 4 Jan 2015 04:00:46 +0100 Subject: [PATCH] Fix varray_detail::construct() (version emulating perfect forwarding). --- bench/detail/varray_util.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bench/detail/varray_util.hpp b/bench/detail/varray_util.hpp index 82917cc..8a97142 100644 --- a/bench/detail/varray_util.hpp +++ b/bench/detail/varray_util.hpp @@ -542,14 +542,14 @@ void construct(DisableTrivialInit const&, // which means that version with one parameter may take V const& v #define BOOST_CONTAINER_VARRAY_UTIL_CONSTRUCT_CODE(N) \ -template \ -inline void construct(DisableTrivialInit const&, I pos BOOST_MOVE_I##N BOOST_MOVE_UREF##N )\ +template \ +inline void construct(DisableTrivialInit const&, I pos, BOOST_FWD_REF(P) p BOOST_MOVE_I##N BOOST_MOVE_UREF##N )\ {\ typedef typename ::boost::container::iterator_traits::value_type V;\ new (static_cast(boost::container::container_detail::addressof(*pos)))\ - V(boost::container::container_detail::addressof(*pos) BOOST_MOVE_I##N BOOST_MOVE_FWD##N); /*may throw*/\ + V(::boost::forward

(p) BOOST_MOVE_I##N BOOST_MOVE_FWD##N); /*may throw*/\ } -BOOST_MOVE_ITERATE_2TO9(BOOST_CONTAINER_VARRAY_UTIL_CONSTRUCT_CODE) +BOOST_MOVE_ITERATE_1TO9(BOOST_CONTAINER_VARRAY_UTIL_CONSTRUCT_CODE) #undef BOOST_CONTAINER_VARRAY_UTIL_CONSTRUCT_CODE #endif // !BOOST_NO_CXX11_VARIADIC_TEMPLATES