#pragma once #include namespace ztu::for_each { template inline constexpr bool type(auto &&f) { return (f.template operator()() || ...); } template inline constexpr bool value(auto &&f) { return (f.template operator()() || ...); } template inline constexpr bool argument(auto &&f, Args&&... args) { return (f(std::forward(args)) || ...); } template inline constexpr bool index(auto&& f) { return [&](std::index_sequence) { return (f.template operator()() || ...); }(std::make_index_sequence()); } template inline constexpr bool indexed_type(auto &&f) { return [&](std::index_sequence) { return (f.template operator()() || ...); }(std::make_index_sequence()); } template inline constexpr bool indexed_value(auto &&f) { return [&](std::index_sequence) { return (f.template operator()() || ...); }(std::make_index_sequence()); } template inline constexpr bool indexed_argument(auto &&f, Args&&... args) { return [&](std::index_sequence) { return (f.template operator()(std::forward(args)) || ...); }(std::make_index_sequence()); } }