39 constexpr bool force_copy_in_expr_impl =
false;
43 struct expr_storage_impl {
49 struct expr_storage_impl<T &>
50 : std::conditional<force_copy_in_expr_impl<std::remove_const_t<T>>, std::remove_const_t<T>, std::reference_wrapper<T>> {};
54 struct expr_storage_impl<T &&> {
60 struct expr_storage_impl<const T &&> {
66 struct expr_storage_impl<const T> {
71 using ull_t =
unsigned long long;
74 template <
typename... Ts>
78 template <
typename T0,
typename... Ts>
79 struct ph_set<T0, Ts...> {
80 static constexpr ull_t value = ph_set<T0>::value | ph_set<Ts...>::value;
86 static constexpr ull_t value = 0;
90 template <ull_t N,
int... Is>
94 template <ull_t N,
int I0,
int... Is>
95 struct ph_filter<N, I0, Is...> {
96 static constexpr ull_t value = ph_filter<N, Is...>::value & (~(1ull << I0));
101 struct ph_filter<N> {
102 static constexpr ull_t value = N;
106 template <
typename T>
107 constexpr bool is_lazy_impl =
false;
110 template <
typename T>
111 requires(!std::is_same_v<T, std::remove_cvref_t<T>>)
112 constexpr bool is_lazy_impl<T> = is_lazy_impl<std::remove_cvref_t<T>>;
115 template <
typename T>
116 inline constexpr bool is_function_impl =
false;
119#if defined(__GNUC__) and not defined(__clang__)
120#pragma GCC diagnostic ignored "-Wunused-but-set-parameter"
124 template <
typename... Is>
125 constexpr bool all_different(
int i0, Is... is) {
126 return (((is - i0) * ... * 1) != 0);
129#if defined(__GNUC__) and not defined(__clang__)
130#pragma GCC diagnostic pop
136 template <
typename T>
152 template <
typename T>
153 constexpr bool is_lazy = detail::is_lazy_impl<T>;
156 template <
typename... Ts>
160 template <
typename... Ts>
164 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.