forked from boostorg/unordered
Rename call_construct to construct_value
This commit is contained in:
@ -1255,7 +1255,7 @@ namespace detail {
|
||||
namespace func {
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// call_construct
|
||||
// construct_value
|
||||
//
|
||||
// Only use allocator_traits::construct, allocator_traits::destroy when full
|
||||
// C++11 support is available.
|
||||
@ -1271,36 +1271,36 @@ namespace func {
|
||||
#elif !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
|
||||
template <typename Alloc, typename T, typename... Args>
|
||||
inline void call_construct(Alloc&, T* address, BOOST_FWD_REF(Args)... args)
|
||||
inline void construct_value(Alloc&, T* address, BOOST_FWD_REF(Args)... args)
|
||||
{
|
||||
new ((void*)address) T(boost::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
#define BOOST_UNORDERED_CALL_CONSTRUCT0(Traits, alloc, address) \
|
||||
boost::unordered::detail::func::call_construct(alloc, address)
|
||||
boost::unordered::detail::func::construct_value(alloc, address)
|
||||
#define BOOST_UNORDERED_CALL_CONSTRUCT1(Traits, alloc, address, a0) \
|
||||
boost::unordered::detail::func::call_construct(alloc, address, a0)
|
||||
boost::unordered::detail::func::construct_value(alloc, address, a0)
|
||||
#define BOOST_UNORDERED_CALL_DESTROY(Traits, alloc, x) \
|
||||
boost::unordered::detail::func::destroy(x)
|
||||
|
||||
#else
|
||||
|
||||
template <typename Alloc, typename T>
|
||||
inline void call_construct(Alloc&, T* address)
|
||||
inline void construct_value(Alloc&, T* address)
|
||||
{
|
||||
new ((void*)address) T();
|
||||
}
|
||||
|
||||
template <typename Alloc, typename T, typename A0>
|
||||
inline void call_construct(Alloc&, T* address, BOOST_FWD_REF(A0) a0)
|
||||
inline void construct_value(Alloc&, T* address, BOOST_FWD_REF(A0) a0)
|
||||
{
|
||||
new ((void*)address) T(boost::forward<A0>(a0));
|
||||
}
|
||||
|
||||
#define BOOST_UNORDERED_CALL_CONSTRUCT0(Traits, alloc, address) \
|
||||
boost::unordered::detail::func::call_construct(alloc, address)
|
||||
boost::unordered::detail::func::construct_value(alloc, address)
|
||||
#define BOOST_UNORDERED_CALL_CONSTRUCT1(Traits, alloc, address, a0) \
|
||||
boost::unordered::detail::func::call_construct(alloc, address, a0)
|
||||
boost::unordered::detail::func::construct_value(alloc, address, a0)
|
||||
#define BOOST_UNORDERED_CALL_DESTROY(Traits, alloc, x) \
|
||||
boost::unordered::detail::func::destroy(x)
|
||||
|
||||
@ -1793,11 +1793,11 @@ construct_node_pair(Alloc& alloc, BOOST_FWD_REF(Key) k)
|
||||
{
|
||||
node_constructor<Alloc> a(alloc);
|
||||
a.create_node();
|
||||
boost::unordered::detail::func::call_construct(alloc,
|
||||
boost::unordered::detail::func::construct_value(alloc,
|
||||
boost::addressof(a.node_->value_ptr()->first), boost::forward<Key>(k));
|
||||
BOOST_TRY
|
||||
{
|
||||
boost::unordered::detail::func::call_construct(
|
||||
boost::unordered::detail::func::construct_value(
|
||||
alloc, boost::addressof(a.node_->value_ptr()->second));
|
||||
}
|
||||
BOOST_CATCH(...)
|
||||
@ -1816,11 +1816,11 @@ construct_node_pair(Alloc& alloc, BOOST_FWD_REF(Key) k, BOOST_FWD_REF(Mapped) m)
|
||||
{
|
||||
node_constructor<Alloc> a(alloc);
|
||||
a.create_node();
|
||||
boost::unordered::detail::func::call_construct(alloc,
|
||||
boost::unordered::detail::func::construct_value(alloc,
|
||||
boost::addressof(a.node_->value_ptr()->first), boost::forward<Key>(k));
|
||||
BOOST_TRY
|
||||
{
|
||||
boost::unordered::detail::func::call_construct(alloc,
|
||||
boost::unordered::detail::func::construct_value(alloc,
|
||||
boost::addressof(a.node_->value_ptr()->second),
|
||||
boost::forward<Mapped>(m));
|
||||
}
|
||||
@ -1841,7 +1841,7 @@ construct_node_pair_from_args(
|
||||
{
|
||||
node_constructor<Alloc> a(alloc);
|
||||
a.create_node();
|
||||
boost::unordered::detail::func::call_construct(alloc,
|
||||
boost::unordered::detail::func::construct_value(alloc,
|
||||
boost::addressof(a.node_->value_ptr()->first), boost::forward<Key>(k));
|
||||
BOOST_TRY
|
||||
{
|
||||
|
Reference in New Issue
Block a user