This commit is contained in:
sha512sum 2024-06-26 08:08:19 +00:00
parent 69b8276361
commit b6aa683d9c

View file

@ -26,20 +26,20 @@ inline constexpr Wrapper<Value> kWrapper;
namespace impl { namespace impl {
template <std::size_t N> 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 } // namespace impl
template <std::size_t N> template <std::size_t N>
inline constexpr impl::kSeq<N> kSeq; 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> template <ConstexprString string, typename T = std::size_t>