1#ifndef LINEARALGEBRA_SRC_MOLPRO_LINALG_ARRAY_UTIL_TYPE_TRAITS_H
2#define LINEARALGEBRA_SRC_MOLPRO_LINALG_ARRAY_UTIL_TYPE_TRAITS_H
14template <
class A,
class =
void_t<>>
27template <
class A,
bool = has_mapped_type_v<A>>
29 using type =
typename A::value_type;
34 using type =
typename A::mapped_type;
41template <
class T,
typename =
void>
46 std::enable_if_t<!is_sparse_v<T>>>> : std::true_type {};
52template <
class T,
typename =
void>
57 T,
void_t<decltype(std::size(std::declval<const T&>())),
58 std::enable_if_t<std::is_pointer_v<decltype(std::data(std::declval<const T&>()))> && !is_sparse_v<T>>>>
65template <
class T,
typename =
void>
75template <
class T,
typename =
void>
88template <
class T,
bool = is_iterable_v<T>,
bool = is_sparse_v<T>,
bool = is_distributed_v<T>,
bool = is_disk_v<T>>
auto begin(Span< T > &x)
Definition Span.h:90
Definition ArrayHandler.h:19
constexpr bool is_sparse_v
Definition type_traits.h:24
constexpr auto array_family_v
Definition type_traits.h:114
constexpr bool has_mapped_type_v
Definition type_traits.h:21
void void_t
Utility for metaprogramming that maps any types to void.
Definition type_traits.h:11
constexpr bool is_disk_v
Definition type_traits.h:82
constexpr bool is_iterable_v
Definition type_traits.h:49
typename mapped_or_value_type< A >::type mapped_or_value_type_t
Definition type_traits.h:38
constexpr auto check_abs()
Definition type_traits.h:117
constexpr bool is_contiguous_v
Definition type_traits.h:62
ArrayFamily
A tag to distinguish different families for array types, e.g. std::vector<> is iterable,...
Definition type_traits.h:85
constexpr bool is_distributed_v
Definition type_traits.h:72
constexpr auto value()
Definition type_traits.h:105
constexpr auto value()
Definition type_traits.h:110
constexpr auto value()
Definition type_traits.h:100
constexpr auto value()
Definition type_traits.h:95
Deduces which family an array type belongs to.
Definition type_traits.h:89
constexpr auto value()
Definition type_traits.h:90
checks that type name A::mapped_type exists
Definition type_traits.h:15
Checks that class T holds its elements in contiguous memory, which std::data() points to,...
Definition type_traits.h:53
Checks if class T has a tag marking it as a distributed disk array.
Definition type_traits.h:76
Checks if class T has a tag marking it as a distributed array.
Definition type_traits.h:66
Checks that class T can be iterated with std::begin and std::end, and is not sparse.
Definition type_traits.h:42
typename A::mapped_type type
Definition type_traits.h:34
Stores A::mapped_type or A::value_type as member type value, with former taking priority if both exis...
Definition type_traits.h:28
typename A::value_type type
Definition type_traits.h:29