File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -195,8 +195,17 @@ inline constexpr auto apply_v = []<size_t... Ns>(utility::index_sequence<Ns...>)
195
195
* static_assert(typeid(variant<int>) == typeid(apply_t<variant, [] { return vector{meta<int>}; }>));
196
196
* @endcode
197
197
*/
198
- template<template<class...> class T, auto V>
199
- using apply_t = decltype(apply_v<T, V>());
198
+ #if defined(__clang__) || defined(_MSC_VER)
199
+ template<template<class...> class R, auto V>
200
+ using apply_t = decltype(apply<R>([] { return V; }));
201
+ #else
202
+ namespace detail {
203
+ template<template<class...> class R, auto V, size_t... Ns>
204
+ using apply_t = R<type_of<V[Ns]>...>;
205
+ } // namespace detail
206
+ template<template<class...> class R, auto V>
207
+ using apply_t = detail::apply_t<R, V, __integer_pack(V.size())...>;
208
+ #endif
200
209
201
210
/**
202
211
* Invokes function with compile-time info based on run-time info
You can’t perform that action at this time.
0 commit comments