Merge branch 'develop'

This commit is contained in:
Daniel James
2017-03-08 01:53:09 +00:00
4 changed files with 9 additions and 6 deletions

View File

@ -492,7 +492,7 @@ template <typename A0> struct emplace_args1
{
BOOST_UNORDERED_EARGS_MEMBER(1, 0, _)
emplace_args1(Arg0 b0) : a0(b0) {}
explicit emplace_args1(Arg0 b0) : a0(b0) {}
};
template <typename A0>

View File

@ -343,7 +343,9 @@ template <class K, class T, class H, class P, class A> class unordered_map
std::pair<iterator, bool> try_emplace(
BOOST_RV_REF(key_type) k, BOOST_FWD_REF(A0) a0)
{
return table_.try_emplace_impl(boost::move(k), boost::forward<A0>(a0));
return table_.try_emplace_impl(
boost::move(k), boost::unordered::detail::create_emplace_args(
boost::forward<A0>(a0)));
}
template <typename A0>
@ -351,7 +353,8 @@ template <class K, class T, class H, class P, class A> class unordered_map
const_iterator hint, BOOST_RV_REF(key_type) k, BOOST_FWD_REF(A0) a0)
{
return table_.try_emplace_hint_impl(
hint, boost::move(k), boost::forward<A0>(a0));
hint, boost::move(k), boost::unordered::detail::create_emplace_args(
boost::forward<A0>(a0)));
}
template <typename A0, typename A1>

View File

@ -148,8 +148,8 @@ template <class X, class T> void container_test(X& r, T const&)
// node_type
typedef BOOST_DEDUCED_TYPENAME X::node_type node_type;
BOOST_STATIC_ASSERT(boost::is_same<allocator_type,
BOOST_DEDUCED_TYPENAME node_type::allocator_type>::value);
BOOST_STATIC_ASSERT((boost::is_same<allocator_type,
BOOST_DEDUCED_TYPENAME node_type::allocator_type>::value));
node_type n1;
node_type n2(rvalue_default<node_type>());

View File

@ -44,7 +44,7 @@ void extract_tests1(Container*, test::random_generator generator)
std::size_t new_size = count ? old_size - 1 : old_size;
typename Container::node_type n =
x.extract(test::get_key<Container>(*it));
BOOST_TEST((bool)n == (bool)count);
BOOST_TEST((n ? true : false) == (count ? true : false));
BOOST_TEST(x.size() == new_size);
BOOST_TEST(x.count(test::get_key<Container>(*it)) == new_count);
if (!new_count) {