tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
layout_mapping_alike.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2
3#ifndef TETL_MDSPAN_LAYOUT_MAPPING_ALIKE_HPP
4#define TETL_MDSPAN_LAYOUT_MAPPING_ALIKE_HPP
5
9
10namespace etl::detail {
11
12// clang-format off
13template<typename M>
14concept layout_mapping_alike = requires { // exposition only
15 requires detail::is_extents<typename M::extents_type>;
16 { M::is_always_strided() } -> same_as<bool>;
17 { M::is_always_exhaustive() } -> same_as<bool>;
18 { M::is_always_unique() } -> same_as<bool>;
19 etl::bool_constant<M::is_always_strided()>::value;
20 etl::bool_constant<M::is_always_exhaustive()>::value;
21 etl::bool_constant<M::is_always_unique()>::value;
22};
23// clang-format on
24
25} // namespace etl::detail
26
27#endif // TETL_MDSPAN_LAYOUT_MAPPING_ALIKE_HPP
integral_constant< bool, B > bool_constant
Definition bool_constant.hpp:11