forked from boostorg/unordered
Unordered: Fix unnecessary_copy_tests failures.
[SVN r73894]
This commit is contained in:
@@ -38,6 +38,11 @@ namespace detail {
|
||||
return v;
|
||||
}
|
||||
|
||||
static key_type const& extract(BOOST_RV_REF(key_type) v)
|
||||
{
|
||||
return v;
|
||||
}
|
||||
|
||||
static no_key extract()
|
||||
{
|
||||
return no_key();
|
||||
@@ -86,6 +91,13 @@ namespace detail {
|
||||
return v;
|
||||
}
|
||||
|
||||
// TODO: Why does this cause errors?
|
||||
//
|
||||
//static key_type const& extract(BOOST_RV_REF(key_type) v)
|
||||
//{
|
||||
// return v;
|
||||
//}
|
||||
|
||||
template <class Second>
|
||||
static key_type const& extract(std::pair<key_type, Second> const& v)
|
||||
{
|
||||
|
@@ -242,9 +242,11 @@ namespace boost { namespace unordered { namespace detail {
|
||||
#else
|
||||
|
||||
template <class Arg0>
|
||||
emplace_return emplace(Arg0 const& arg0)
|
||||
emplace_return emplace(BOOST_FWD_REF(Arg0) arg0)
|
||||
{
|
||||
return emplace_impl(extractor::extract(arg0), arg0);
|
||||
return emplace_impl(
|
||||
extractor::extract(boost::forward<Arg0>(arg0)),
|
||||
boost::forward<Arg0>(arg0));
|
||||
}
|
||||
|
||||
#define BOOST_UNORDERED_INSERT1_IMPL(z, n, _) \
|
||||
|
Reference in New Issue
Block a user