38 constexpr bool force_copy_in_expr_impl =
false;
42 struct expr_storage_impl {
48 struct expr_storage_impl<T &>
49 : std::conditional<force_copy_in_expr_impl<std::remove_const_t<T>>, std::remove_const_t<T>, std::reference_wrapper<T>> {};
53 struct expr_storage_impl<T &&> {
59 struct expr_storage_impl<const T &&> {
65 struct expr_storage_impl<const T> {
70 using ull_t =
unsigned long long;
73 template <
typename... Ts>
77 template <
typename T0,
typename... Ts>
78 struct ph_set<T0, Ts...> {
79 static constexpr ull_t value = ph_set<T0>::value | ph_set<Ts...>::value;
85 static constexpr ull_t value = 0;
89 template <ull_t N,
int... Is>
93 template <ull_t N,
int I0,
int... Is>
94 struct ph_filter<N, I0, Is...> {
95 static constexpr ull_t value = ph_filter<N, Is...>::value & (~(1ull << I0));
100 struct ph_filter<N> {
101 static constexpr ull_t value = N;
105 template <
typename T>
106 constexpr bool is_lazy_impl =
false;
109 template <
typename T>
110 requires(!std::is_same_v<T, std::remove_cvref_t<T>>)
111 constexpr bool is_lazy_impl<T> = is_lazy_impl<std::remove_cvref_t<T>>;
114 template <
typename T>
115 inline constexpr bool is_function_impl =
false;
118#if defined(__GNUC__) and not defined(__clang__)
119#pragma GCC diagnostic ignored "-Wunused-but-set-parameter"
123 template <
typename... Is>
124 constexpr bool all_different(
int i0, Is... is) {
125 return (((is - i0) * ... * 1) != 0);
128#if defined(__GNUC__) and not defined(__clang__)
129#pragma GCC diagnostic pop
135 template <
typename T>
151 template <
typename T>
152 constexpr bool is_lazy = detail::is_lazy_impl<T>;
155 template <
typename... Ts>
159 template <
typename... Ts>
163 template <
typename T>
constexpr bool is_clef_expression
Alias template for nda::clef::is_any_lazy.
constexpr bool is_lazy
Constexpr variable that is true if the type T is a lazy type.
typename detail::expr_storage_impl< T >::type expr_storage_t
Type trait to determine how a type should be stored in an expression tree, i.e. either by reference o...
constexpr bool force_copy_in_expr
Constexpr variable that is true if objects of type T should be forced to be copied into an expression...
constexpr bool is_function
Constexpr variable that is true if the type T is an nda::clef::make_fun_impl type.
constexpr bool is_any_lazy
Constexpr variable that is true if any of the given types is lazy.