27 constexpr bool force_copy_in_expr_impl =
false;
31 struct expr_storage_impl {
37 struct expr_storage_impl<T &>
38 : std::conditional<force_copy_in_expr_impl<std::remove_const_t<T>>, std::remove_const_t<T>, std::reference_wrapper<T>> {};
42 struct expr_storage_impl<T &&> {
48 struct expr_storage_impl<const T &&> {
54 struct expr_storage_impl<const T> {
59 using ull_t =
unsigned long long;
62 template <
typename... Ts>
66 template <
typename T0,
typename... Ts>
67 struct ph_set<T0, Ts...> {
68 static constexpr ull_t value = ph_set<T0>::value | ph_set<Ts...>::value;
74 static constexpr ull_t value = 0;
78 template <ull_t N,
int... Is>
82 template <ull_t N,
int I0,
int... Is>
83 struct ph_filter<N, I0, Is...> {
84 static constexpr ull_t value = ph_filter<N, Is...>::value & (~(1ull << I0));
90 static constexpr ull_t value = N;
95 constexpr bool is_lazy_impl =
false;
99 requires(!std::is_same_v<T, std::remove_cvref_t<T>>)
100 constexpr bool is_lazy_impl<T> = is_lazy_impl<std::remove_cvref_t<T>>;
103 template <
typename T>
104 inline constexpr bool is_function_impl =
false;
107#if defined(__GNUC__) and not defined(__clang__)
108#pragma GCC diagnostic ignored "-Wunused-but-set-parameter"
112 template <
typename... Is>
113 constexpr bool all_different(
int i0, Is... is) {
114 return (((is - i0) * ... * 1) != 0);
117#if defined(__GNUC__) and not defined(__clang__)
118#pragma GCC diagnostic pop
124 template <
typename T>
140 template <
typename T>
141 constexpr bool is_lazy = detail::is_lazy_impl<T>;
144 template <
typename... Ts>
148 template <
typename... Ts>
152 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.