SpECTRE  v2024.03.19
tt::is_std_array< T > Struct Template Reference

Check if type T is a std::array. More...

#include <IsStdArray.hpp>

Detailed Description

template<typename T>
struct tt::is_std_array< T >

Check if type T is a std::array.

Details

Given a type T derives from std::true_type if T is a std::array and from std::false_type if T is not a std::array.

Usage

For any type T

using result = tt::is_std_array<T>;
Check if type T is a std::array.
Definition: IsStdArray.hpp:42

Returns: std::bool_constant

Semantics: If T is a std::array then

otherwise

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

Example

"Failed testing type trait is_std_array");
"Failed testing type trait is_std_array");
static_assert(tt::is_std_array_v<std::array<double, 3>>,
"Failed testing type trait is_std_array");
"Failed testing type trait is_std_array");
"Failed testing type trait is_std_array");
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< T >::type is_std_array_t
Definition: IsStdArray.hpp:55
See also
is_a is_std_array_of_size
Template Parameters
Tthe type to check

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