mirror of
https://github.com/Naios/continuable.git
synced 2025-12-06 16:56:44 +08:00
Add a workaround for MSVC 16.2 that causes compilation to fail with a "parameter pack must be expanded in this context" error
This commit is contained in:
parent
42af23fa03
commit
7177ab844b
@ -132,8 +132,13 @@ class result {
|
|||||||
|
|
||||||
struct init_arg_t {};
|
struct init_arg_t {};
|
||||||
|
|
||||||
template <typename... Args, detail::traits::void_t<decltype(trait_t::wrap(
|
template <typename... Args
|
||||||
std::declval<Args>()...))>* = nullptr>
|
#if defined(_MSC_VER) && _MSC_VER != 1922
|
||||||
|
,
|
||||||
|
detail::traits::void_t<
|
||||||
|
decltype(trait_t::wrap(std::declval<Args>()...))>* = nullptr
|
||||||
|
#endif
|
||||||
|
>
|
||||||
explicit result(init_arg_t, Args&&... values)
|
explicit result(init_arg_t, Args&&... values)
|
||||||
: variant_(trait_t::wrap(std::forward<Args>(values)...)) {
|
: variant_(trait_t::wrap(std::forward<Args>(values)...)) {
|
||||||
}
|
}
|
||||||
@ -144,9 +149,13 @@ class result {
|
|||||||
public:
|
public:
|
||||||
using value_t = typename trait_t::value_t;
|
using value_t = typename trait_t::value_t;
|
||||||
|
|
||||||
template <typename FirstArg, typename... Args,
|
template <typename FirstArg, typename... Args
|
||||||
|
#if defined(_MSC_VER) && _MSC_VER != 1922
|
||||||
|
,
|
||||||
detail::traits::void_t<decltype(trait_t::wrap(
|
detail::traits::void_t<decltype(trait_t::wrap(
|
||||||
std::declval<FirstArg>(), std::declval<Args>()...))>* = nullptr>
|
std::declval<FirstArg>(), std::declval<Args>()...))>* = nullptr
|
||||||
|
#endif
|
||||||
|
>
|
||||||
explicit result(FirstArg&& first, Args&&... values)
|
explicit result(FirstArg&& first, Args&&... values)
|
||||||
: variant_(trait_t::wrap(std::forward<FirstArg>(first),
|
: variant_(trait_t::wrap(std::forward<FirstArg>(first),
|
||||||
std::forward<Args>(values)...)) {
|
std::forward<Args>(values)...)) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user