Use the preprocessor to increment emplace limit

So that there's no need to add one.
This commit is contained in:
Daniel James
2017-04-23 09:44:56 +01:00
parent cfe4c26f99
commit 42b6b13943
3 changed files with 12 additions and 12 deletions

View File

@ -58,12 +58,12 @@
// Unless documented elsewhere these configuration macros should be considered
// 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
// that might break something.
#if !defined BOOST_UNORDERED_EMPLACE_LIMIT
#define BOOST_UNORDERED_EMPLACE_LIMIT 11
#define BOOST_UNORDERED_EMPLACE_LIMIT 10
#endif
// 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(
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_EARGS_MEMBER
@ -1590,8 +1590,8 @@ inline void construct_from_args(
num_params, BOOST_UNORDERED_CALL_FORWARD, args.a)); \
}
BOOST_PP_REPEAT_FROM_TO(
4, BOOST_UNORDERED_EMPLACE_LIMIT, BOOST_UNORDERED_CONSTRUCT_IMPL, _)
BOOST_PP_REPEAT_FROM_TO(4, BOOST_PP_INC(BOOST_UNORDERED_EMPLACE_LIMIT),
BOOST_UNORDERED_CONSTRUCT_IMPL, _)
#undef BOOST_UNORDERED_CONSTRUCT_IMPL

View File

@ -339,7 +339,7 @@ template <class K, class T, class H, class P, class A> class unordered_map
}
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
@ -626,7 +626,7 @@ template <class K, class T, class H, class P, class A> class unordered_map
}
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
@ -1086,7 +1086,7 @@ template <class K, class T, class H, class P, class A> class unordered_multimap
}
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

View File

@ -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_REPEAT_FROM_TO(
4, BOOST_UNORDERED_EMPLACE_LIMIT, BOOST_UNORDERED_EMPLACE, _)
BOOST_PP_REPEAT_FROM_TO(4, BOOST_PP_INC(BOOST_UNORDERED_EMPLACE_LIMIT),
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_REPEAT_FROM_TO(
4, BOOST_UNORDERED_EMPLACE_LIMIT, BOOST_UNORDERED_EMPLACE, _)
BOOST_PP_REPEAT_FROM_TO(4, BOOST_PP_INC(BOOST_UNORDERED_EMPLACE_LIMIT),
BOOST_UNORDERED_EMPLACE, _)
#undef BOOST_UNORDERED_EMPLACE