Add missing variadic template emulation in use_future.
This commit is contained in:
parent
5c591a4667
commit
4ad7a397ce
@ -543,6 +543,8 @@ template <typename Arg>
|
||||
class promise_handler_selector<void(std::exception_ptr, Arg)>
|
||||
: public promise_handler_ex_1<Arg> {};
|
||||
|
||||
#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
|
||||
|
||||
template <typename... Arg>
|
||||
class promise_handler_selector<void(Arg...)>
|
||||
: public promise_handler_n<std::tuple<Arg...> > {};
|
||||
@ -555,6 +557,32 @@ template <typename... Arg>
|
||||
class promise_handler_selector<void(std::exception_ptr, Arg...)>
|
||||
: public promise_handler_ex_n<std::tuple<Arg...> > {};
|
||||
|
||||
#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
|
||||
|
||||
#define ASIO_PRIVATE_PROMISE_SELECTOR_DEF(n) \
|
||||
template <typename Arg, ASIO_VARIADIC_TPARAMS(n)> \
|
||||
class promise_handler_selector< \
|
||||
void(Arg, ASIO_VARIADIC_TARGS(n))> \
|
||||
: public promise_handler_n< \
|
||||
std::tuple<Arg, ASIO_VARIADIC_TARGS(n)> > {}; \
|
||||
\
|
||||
template <typename Arg, ASIO_VARIADIC_TPARAMS(n)> \
|
||||
class promise_handler_selector< \
|
||||
void(asio::error_code, Arg, ASIO_VARIADIC_TARGS(n))> \
|
||||
: public promise_handler_ec_n< \
|
||||
std::tuple<Arg, ASIO_VARIADIC_TARGS(n)> > {}; \
|
||||
\
|
||||
template <typename Arg, ASIO_VARIADIC_TPARAMS(n)> \
|
||||
class promise_handler_selector< \
|
||||
void(std::exception_ptr, Arg, ASIO_VARIADIC_TARGS(n))> \
|
||||
: public promise_handler_ex_n< \
|
||||
std::tuple<Arg, ASIO_VARIADIC_TARGS(n)> > {}; \
|
||||
/**/
|
||||
ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_PROMISE_SELECTOR_DEF)
|
||||
#undef ASIO_PRIVATE_PROMISE_SELECTOR_DEF
|
||||
|
||||
#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
|
||||
|
||||
// Completion handlers produced from the use_future completion token, when not
|
||||
// using use_future::operator().
|
||||
template <typename Signature, typename Allocator>
|
||||
|
Loading…
Reference in New Issue
Block a user