forked from boostorg/unordered
Use the preprocessor to increment emplace limit
So that there's no need to add one.
This commit is contained in:
@ -58,12 +58,12 @@
|
|||||||
// Unless documented elsewhere these configuration macros should be considered
|
// Unless documented elsewhere these configuration macros should be considered
|
||||||
// an implementation detail, I'll try not to break them, but you never know.
|
// an implementation detail, I'll try not to break them, but you never know.
|
||||||
|
|
||||||
// BOOST_UNORDERED_EMPLACE_LIMIT = The maximum number of parameters + 1 in
|
// BOOST_UNORDERED_EMPLACE_LIMIT = The maximum number of parameters in
|
||||||
// emplace (not including things like hints). Don't set it to a lower value, as
|
// emplace (not including things like hints). Don't set it to a lower value, as
|
||||||
// that might break something.
|
// that might break something.
|
||||||
|
|
||||||
#if !defined BOOST_UNORDERED_EMPLACE_LIMIT
|
#if !defined BOOST_UNORDERED_EMPLACE_LIMIT
|
||||||
#define BOOST_UNORDERED_EMPLACE_LIMIT 11
|
#define BOOST_UNORDERED_EMPLACE_LIMIT 10
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// BOOST_UNORDERED_INTEROPERABLE_NODES - Use the same node type for
|
// BOOST_UNORDERED_INTEROPERABLE_NODES - Use the same node type for
|
||||||
@ -619,7 +619,7 @@ inline emplace_args3<A0, A1, A2> create_emplace_args(
|
|||||||
}
|
}
|
||||||
|
|
||||||
BOOST_PP_REPEAT_FROM_TO(
|
BOOST_PP_REPEAT_FROM_TO(
|
||||||
4, BOOST_UNORDERED_EMPLACE_LIMIT, BOOST_UNORDERED_EARGS, _)
|
4, BOOST_PP_INC(BOOST_UNORDERED_EMPLACE_LIMIT), BOOST_UNORDERED_EARGS, _)
|
||||||
|
|
||||||
#undef BOOST_UNORDERED_DEFINE_EMPLACE_ARGS
|
#undef BOOST_UNORDERED_DEFINE_EMPLACE_ARGS
|
||||||
#undef BOOST_UNORDERED_EARGS_MEMBER
|
#undef BOOST_UNORDERED_EARGS_MEMBER
|
||||||
@ -1590,8 +1590,8 @@ inline void construct_from_args(
|
|||||||
num_params, BOOST_UNORDERED_CALL_FORWARD, args.a)); \
|
num_params, BOOST_UNORDERED_CALL_FORWARD, args.a)); \
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOST_PP_REPEAT_FROM_TO(
|
BOOST_PP_REPEAT_FROM_TO(4, BOOST_PP_INC(BOOST_UNORDERED_EMPLACE_LIMIT),
|
||||||
4, BOOST_UNORDERED_EMPLACE_LIMIT, BOOST_UNORDERED_CONSTRUCT_IMPL, _)
|
BOOST_UNORDERED_CONSTRUCT_IMPL, _)
|
||||||
|
|
||||||
#undef BOOST_UNORDERED_CONSTRUCT_IMPL
|
#undef BOOST_UNORDERED_CONSTRUCT_IMPL
|
||||||
|
|
||||||
|
@ -339,7 +339,7 @@ template <class K, class T, class H, class P, class A> class unordered_map
|
|||||||
}
|
}
|
||||||
|
|
||||||
BOOST_PP_REPEAT_FROM_TO(
|
BOOST_PP_REPEAT_FROM_TO(
|
||||||
4, BOOST_UNORDERED_EMPLACE_LIMIT, BOOST_UNORDERED_EMPLACE, _)
|
4, BOOST_PP_INC(BOOST_UNORDERED_EMPLACE_LIMIT), BOOST_UNORDERED_EMPLACE, _)
|
||||||
|
|
||||||
#undef BOOST_UNORDERED_EMPLACE
|
#undef BOOST_UNORDERED_EMPLACE
|
||||||
|
|
||||||
@ -626,7 +626,7 @@ template <class K, class T, class H, class P, class A> class unordered_map
|
|||||||
}
|
}
|
||||||
|
|
||||||
BOOST_PP_REPEAT_FROM_TO(
|
BOOST_PP_REPEAT_FROM_TO(
|
||||||
4, BOOST_UNORDERED_EMPLACE_LIMIT, BOOST_UNORDERED_TRY_EMPLACE, _)
|
4, BOOST_PP_INC(BOOST_UNORDERED_EMPLACE_LIMIT), BOOST_UNORDERED_TRY_EMPLACE, _)
|
||||||
|
|
||||||
#undef BOOST_UNORDERED_TRY_EMPLACE
|
#undef BOOST_UNORDERED_TRY_EMPLACE
|
||||||
|
|
||||||
@ -1086,7 +1086,7 @@ template <class K, class T, class H, class P, class A> class unordered_multimap
|
|||||||
}
|
}
|
||||||
|
|
||||||
BOOST_PP_REPEAT_FROM_TO(
|
BOOST_PP_REPEAT_FROM_TO(
|
||||||
4, BOOST_UNORDERED_EMPLACE_LIMIT, BOOST_UNORDERED_EMPLACE, _)
|
4, BOOST_PP_INC(BOOST_UNORDERED_EMPLACE_LIMIT), BOOST_UNORDERED_EMPLACE, _)
|
||||||
|
|
||||||
#undef BOOST_UNORDERED_EMPLACE
|
#undef BOOST_UNORDERED_EMPLACE
|
||||||
|
|
||||||
|
@ -336,8 +336,8 @@ template <class T, class H, class P, class A> class unordered_set
|
|||||||
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, a))); \
|
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, a))); \
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOST_PP_REPEAT_FROM_TO(
|
BOOST_PP_REPEAT_FROM_TO(4, BOOST_PP_INC(BOOST_UNORDERED_EMPLACE_LIMIT),
|
||||||
4, BOOST_UNORDERED_EMPLACE_LIMIT, BOOST_UNORDERED_EMPLACE, _)
|
BOOST_UNORDERED_EMPLACE, _)
|
||||||
|
|
||||||
#undef BOOST_UNORDERED_EMPLACE
|
#undef BOOST_UNORDERED_EMPLACE
|
||||||
|
|
||||||
@ -811,8 +811,8 @@ template <class T, class H, class P, class A> class unordered_multiset
|
|||||||
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, a))); \
|
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, a))); \
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOST_PP_REPEAT_FROM_TO(
|
BOOST_PP_REPEAT_FROM_TO(4, BOOST_PP_INC(BOOST_UNORDERED_EMPLACE_LIMIT),
|
||||||
4, BOOST_UNORDERED_EMPLACE_LIMIT, BOOST_UNORDERED_EMPLACE, _)
|
BOOST_UNORDERED_EMPLACE, _)
|
||||||
|
|
||||||
#undef BOOST_UNORDERED_EMPLACE
|
#undef BOOST_UNORDERED_EMPLACE
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user