Fix kSeq
This commit is contained in:
parent
69b8276361
commit
b6aa683d9c
1 changed files with 8 additions and 8 deletions
|
@ -26,20 +26,20 @@ inline constexpr Wrapper<Value> kWrapper;
|
|||
namespace impl {
|
||||
|
||||
template <std::size_t N>
|
||||
struct kSeq {};
|
||||
struct kSeq {
|
||||
template <typename F>
|
||||
friend constexpr auto operator|(F&& f, const kSeq<N>&) {
|
||||
return [&]<std::size_t... Is>(std::index_sequence<Is...>){
|
||||
return std::forward<F>(f)(kWrapper<Is>...);
|
||||
}(std::make_index_sequence<N>());
|
||||
};
|
||||
};
|
||||
|
||||
} // namespace impl
|
||||
|
||||
template <std::size_t N>
|
||||
inline constexpr impl::kSeq<N> kSeq;
|
||||
|
||||
template <typename F, std::size_t N>
|
||||
constexpr auto operator|(F&& f, impl::kSeq<N>) {
|
||||
return [&]<std::size_t... Is>(std::index_sequence<Is...>){
|
||||
return std::forward<F>(f)(kWrapper<Is>...);
|
||||
}(std::make_index_sequence<N>());
|
||||
};
|
||||
|
||||
|
||||
|
||||
template <ConstexprString string, typename T = std::size_t>
|
||||
|
|
Loading…
Reference in a new issue