13 template<
typename T,
size_t N, std::invocable<const T&> UnaryOperation>
16 Vector<
decltype(std::invoke(op, x[0])),
N> rv{};
17 for (
size_t i = 0; i <
N; ++i) {
18 rv[i] = std::invoke(op, x[i]);
24 template<
typename T,
size_t N, std::invocable<const T&, const T&> BinaryOperation>
27 Vector<
decltype(std::invoke(op, x[0], y[0])),
N> rv{};
28 for (
size_t i = 0; i <
N; ++i) {
29 rv[i] = std::invoke(op, x[i], y[i]);
35 template<
typename T,
size_t N, std::invocable<const T&, const T&, const T&> TernaryOperation>
37 ->
Vector<
decltype(std::invoke(op, x[0], y[0], z[0])),
N>
39 Vector<
decltype(std::invoke(op, x[0], y[0], z[0])),
N> rv{};
40 for (
size_t i = 0; i <
N; ++i) {
41 rv[i] = std::invoke(op, x[i], y[i], z[i]);
50 return std::ranges::all_of(v, std::identity{});
57 return std::ranges::any_of(v, std::identity{});
64 return std::ranges::none_of(v, std::identity{});
Definition custom_decoration_generator.h:5
constexpr auto map(const Rgba< T > &x, UnaryOperation op) -> Rgba< decltype(std::invoke(op, x[0]))>
Definition rgba.h:208
constexpr bool all_of(const Vector< bool, N > &v)
Definition functors.h:48
constexpr bool any_of(const Vector< bool, N > &v)
Definition functors.h:55
constexpr bool none_of(const Vector< bool, N > &v)
Definition functors.h:62