5#ifndef INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_MDSPAN_IS_SUBMDSPAN_SLICE_HPP_
6#define INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_MDSPAN_IS_SUBMDSPAN_SLICE_HPP_
8#include "arene/base/constraints/constraints.hpp"
9#include "arene/base/mdspan/full_extent.hpp"
10#include "arene/base/mdspan/slice.hpp"
11#include "arene/base/stdlib_choice/enable_if.hpp"
12#include "arene/base/stdlib_choice/is_convertible.hpp"
13#include "arene/base/stdlib_choice/is_integral.hpp"
14#include "arene/base/stdlib_choice/remove_reference.hpp"
15#include "arene/base/stdlib_choice/tuple_element.hpp"
16#include "arene/base/type_traits/is_instantiation_of.hpp"
17#include "arene/base/type_traits/is_tuple_like.hpp"
21namespace is_submdspan_slice_detail {
26template <
class IndexType,
class Slice,
class = constraints<>>
27extern constexpr bool is_submdspan_slice_v =
false;
34template <
class IndexType,
class Slice>
35extern constexpr bool is_submdspan_slice_v<
38 constraints<std::enable_if_t<
39 !std::is_integral<IndexType>::value>>
42 std::is_integral<IndexType>::value,
43 "'IndexType' must be an integer."
55template <
class IndexType,
class Slice>
56extern constexpr bool is_submdspan_slice_v<
59 constraints<std::enable_if_t<
60 std::is_integral<IndexType>::value &&
61 (std::is_convertible<Slice, full_extent_t>::value ||
62 std::is_convertible<Slice, IndexType>::value ||
63 is_instantiation_of_v<Slice, extent_slice> ||
64 is_instantiation_of_v<Slice, range_slice>)>>> =
true;
71template <
class IndexType,
class Slice>
72extern constexpr bool is_submdspan_slice_v<
75 constraints<std::enable_if_t<
76 std::is_integral<IndexType>::value &&
77 is_pair_like_v<Slice>>>> =
78 std::is_convertible<std::tuple_element_t<0, std::remove_reference_t<Slice>>, IndexType>::value &&
79 std::is_convertible<std::tuple_element_t<1, std::remove_reference_t<Slice>>, IndexType>::value;
Definition array_exceptions_disabled.cpp:11
constexpr bool is_submdspan_slice_v
helper trait to check if a type is a submdspan slice type
Copyright 2026, Toyota Motor Corporation.
Definition array_exceptions_disabled.cpp:10