SpECTRE  v2024.04.12
tt::get_fundamental_type< T, typename > Struct Template Reference

Extracts the fundamental type for a container. More...

#include <GetFundamentalType.hpp>

Public Types

using type = tmpl::conditional_t< std::is_fundamental_v< T >, T, NoSuchType >
 

Detailed Description

template<typename T, typename = std::nullptr_t>
struct tt::get_fundamental_type< T, typename >

Extracts the fundamental type for a container.

Details

Designates a type alias get_fundamental_type::type as T when T itself is an appropriate fundamental type, and the contained type of a container which specifies a value_type.

get_fundamental_type_t<T> is provided as a type alias to type from get_fundamental_type<T>

static_assert(
std::is_same_v<
"Failed testing get_fundamental_type");
static_assert(
std::is_same_v<
typename tt::get_fundamental_type_t<std::vector<std::complex<int>>>,
int>,
"Failed testing get_fundamental_type");
static_assert(std::is_same_v<typename tt::get_fundamental_type_t<int>, int>,
"Failed testing get_fundamental_type");
Extracts the fundamental type for a container.
Definition: GetFundamentalType.hpp:34

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