39 template <
int N,
typename T>
62 static_assert(N >= 0 && N < 64,
"Placeholder index must be in {0, 1, ..., 63}");
74 template <
typename RHS>
76 return {std::forward<RHS>(rhs)};
87 template <
typename... Args>
100 template <
typename T>
116 template <
int N,
typename T>
122 static constexpr int p = N;
132 constexpr bool force_copy_in_expr_impl<placeholder<N>> =
true;
137 static constexpr ull_t value = 1ull << N;
141 template <
int N,
typename T>
142 struct ph_set<pair<N, T>> : ph_set<placeholder<N>> {};
146 constexpr bool is_lazy_impl<placeholder<N>> =
true;
Provides a basic lazy expression type for the clef library.
Single node of the expression tree.
A pair consisting of a placeholder and its assigned value.
T rhs
Value assigned to the placeholder (can be an lvalue reference).
static constexpr int p
Integer label of the placeholder.
std::decay_t< T > value_type
Type of the value after applying std::decay.
A placeholder is an empty struct, labelled by an int.
static constexpr int index
Integer label.
auto operator[](T &&t) const
Subscript operator.
pair< N, RHS > operator=(RHS &&rhs) const
Assign a value to the placeholder.
auto operator()(Args &&...args) const
Function call operator.
Provides some utility functions and type traits for the CLEF library.