27 static auto test(
int) ->
decltype(std::begin(std::declval<S>()), std::end(std::declval<S>()), std::true_type{});
30 static auto test(...) -> std::false_type;
44 static auto test(
int) ->
decltype(std::size(std::declval<S>()), std::data(std::declval<S>()), std::true_type{});
47 static auto test(...) -> std::false_type;
62 static auto test(
int) ->
decltype(std::integral_constant<size_t, std::tuple_size<S>::value>{});
65 static auto test(...) -> std::integral_constant<size_t, 0>;
77constexpr bool is_destination_buffer_pair_v = [] {
79 return is_contiguous_sized_range_v<std::remove_const_t<std::tuple_element_t<
81 T>>> && std::is_convertible_v<std::remove_const_t<std::tuple_element_t<0, T>>,
int>;
90constexpr bool is_sparse_send_buffer_v = [] {
91 if constexpr (is_range_v<T>) {
92 return is_destination_buffer_pair_v<std::remove_const_t<typename T::value_type>>;
101constexpr bool is_nested_send_buffer_v = [] {
102 if constexpr (is_range_v<T>) {
103 return is_contiguous_sized_range_v<std::remove_const_t<typename T::value_type>>;
STL-compatible allocator for requesting memory using the builtin MPI allocator.
Definition allocator.hpp:32
A type trait that checks if a type T is a contiguous and sized range, i.e., it is a range and has std...
Definition traits.hpp:41
static constexpr bool value
The value of the trait.
Definition traits.hpp:48
static auto test(...) -> std::false_type
Fallback overload.
static auto test(int) -> decltype(std::size(std::declval< S >()), std::data(std::declval< S >()), std::true_type{})
Only enable this overload if std::size and std::data are defined for S.
A type trait that checks if a type T is a pair-like type, i.e., it may be destructured using std::get...
Definition traits.hpp:59
static auto test(...) -> std::integral_constant< size_t, 0 >
Fallback overload, returns size 0.
static constexpr bool value
The value of the trait.
Definition traits.hpp:66
static auto test(int) -> decltype(std::integral_constant< size_t, std::tuple_size< S >::value >{})
Only enable this overload if std::tuple_size is defined for S.
A type trait that checks if a type T is a range, i.e., it has std::begin and std::end defined.
Definition traits.hpp:24
static auto test(int) -> decltype(std::begin(std::declval< S >()), std::end(std::declval< S >()), std::true_type{})
Only enable this overload if std::begin and std::end are defined for S.
static auto test(...) -> std::false_type
Fallback overload.
static constexpr bool value
The value of the trait.
Definition traits.hpp:31