forked from boostorg/unordered
Use normal emplace implementation for emplace_hint and insert with hint.
There's a bug in the emplace_hint implementation for unordered containers with equivalent keys. Since my tests missed it, I'm just going to use the normal emplace implementation until I write better tests. [SVN r57005]
This commit is contained in:
1 parent
6c24cccf96
commit
8d4b503e56
4 files changed
+20
-91
No files matched your search
@@ -710,8 +710,6 @@ namespace boost { namespace unordered_detail {
|
||||
// Insert methods
|
||||
|
||||
iterator_base emplace_impl(node_constructor& a);
|
||||
iterator_base emplace_hint_impl(iterator_base const& it,
|
||||
node_constructor& a);
|
||||
void emplace_impl_no_rehash(node_constructor& a);
|
||||
|
||||
// equals
|
||||
@@ -725,18 +723,12 @@ namespace boost { namespace unordered_detail {
|
||||
|
||||
template <class... Args>
|
||||
iterator_base emplace(Args&&... args);
|
||||
template <class... Args>
|
||||
iterator_base emplace_hint(iterator_base const& it, Args&&... args);
|
||||
|
||||
#else
|
||||
|
||||
#define BOOST_UNORDERED_INSERT_IMPL(z, n, _) \
|
||||
template <BOOST_UNORDERED_TEMPLATE_ARGS(z, n)> \
|
||||
iterator_base emplace(BOOST_UNORDERED_FUNCTION_PARAMS(z, n)); \
|
||||
\
|
||||
template <BOOST_UNORDERED_TEMPLATE_ARGS(z, n)> \
|
||||
iterator_base emplace_hint(iterator_base const& it, \
|
||||
BOOST_UNORDERED_FUNCTION_PARAMS(z, n));
|
||||
iterator_base emplace(BOOST_UNORDERED_FUNCTION_PARAMS(z, n));
|
||||
|
||||
BOOST_PP_REPEAT_FROM_TO(1, BOOST_UNORDERED_EMPLACE_LIMIT,
|
||||
BOOST_UNORDERED_INSERT_IMPL, _)
|
||||
|
||||
Reference in new issue
Block a user