SpECTRE  v2024.04.12
tt::is_std_array_of_size< N, T > Struct Template Reference

Check if type T is a std::array of a given size. More...

#include <IsStdArrayOfSize.hpp>

Detailed Description

template<size_t N, typename T>
struct tt::is_std_array_of_size< N, T >

Check if type T is a std::array of a given size.

Details

Given a size_t N and type T derives from std::true_type if T is a std::array of size N and from std::false_type otherwise.

Usage

For any type T

Check if type T is a std::array of a given size.
Definition: IsStdArrayOfSize.hpp:43

Returns: std::bool_constant

Semantics: If T is a std::array of size N then

otherwise

typename result::type = std::bool_constant<false>;

Example

"Failed testing type trait is_std_array_of_size");
"Failed testing type trait is_std_array_of_size");
static_assert(tt::is_std_array_of_size_v<3, std::array<double, 3>>,
"Failed testing type trait is_std_array_of_size");
"Failed testing type trait is_std_array_of_size");
"Failed testing type trait is_std_array_of_size");
"Failed testing type trait is_std_array_of_size");
constexpr T & value(T &t)
Returns t.value() if t is a std::optional otherwise returns t.
Definition: OptionalHelpers.hpp:32
typename is_std_array_of_size< N, T >::type is_std_array_of_size_t
Definition: IsStdArrayOfSize.hpp:56
See also
is_std_array
Template Parameters
Tthe type to check

The documentation for this struct was generated from the following file: