Expression Templates Library (ETL)
concepts_base.hpp
1 //=======================================================================
2 // Copyright (c) 2023 Baptiste Wicht
3 // Distributed under the terms of the MIT License.
4 // (See accompanying file LICENSE or copy at
5 // http://opensource.org/licenses/MIT)
6 //=======================================================================
7 
8 #pragma once
9 
10 #include <concepts>
11 #include <type_traits>
12 
13 namespace etl {
14 
15 template<typename T>
16 concept etl_expr = decay_traits<T>::is_etl;
17 
18 template<typename T>
19 struct scalar;
20 
21 template <typename T, typename VT>
22 concept expr_or_scalar = etl_expr<T> || std::same_as<T, scalar<VT>>;
23 
24 } // namespace etl
static constexpr bool is_etl
Indicates if T is an ETL type.
Definition: traits_base.hpp:21
Root namespace for the ETL library.
Definition: adapter.hpp:15
Represents a scalar value.
Definition: concepts_base.hpp:19