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// SPDX-FileCopyrightText: Copyright (C) 2023 Tobias Hienzsch
3
4#ifndef TETL_MDSPAN_LAYOUT_MAPPING_ALIKE_HPP
5#define TETL_MDSPAN_LAYOUT_MAPPING_ALIKE_HPP
6
7#include <etl/_concepts/same_as.hpp>
8#include <etl/_mdspan/is_extents.hpp>
9#include <etl/_type_traits/bool_constant.hpp>
10
11namespace etl::detail {
12
13template <typename M>
14concept layout_mapping_alike = requires {
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
24} // namespace etl::detail
25
26#endif // TETL_MDSPAN_LAYOUT_MAPPING_ALIKE_HPP
Definition adjacent_find.hpp:9