SpECTRE
v2024.09.29
|
A collection of useful type traits. More...
Classes | |
struct | assert_conforms_to |
Assert that the ConformingType conforms to the Protocol . More... | |
struct | can_be_copy_constructed |
Check if T is copy constructible. More... | |
struct | conforms_to |
Checks if the ConformingType conforms to the Protocol . More... | |
struct | ConformsTo |
Indicate a class conforms to the Protocol . More... | |
struct | get_complex_or_fundamental_type |
struct | get_fundamental_type |
Extracts the fundamental type for a container. More... | |
struct | has_equivalence |
Check if type T has operator== defined. More... | |
struct | has_inequivalence |
Check if type T has operator!= defined. More... | |
class | is_callable |
Check if a type T is callable, i.e. T(Args...) is evaluable. More... | |
struct | is_complex_of_fundamental |
Determines if a type T is a std::complex of a fundamental type, is a std::true_type if so, and otherwise is a std::false_type More... | |
struct | is_integer |
Check if I is an integer type (non-bool, non-character), unlike std::is_integral. More... | |
struct | is_iterable |
Check if type T has a begin() and end() function. More... | |
struct | is_maplike |
Check if type T is like a std::map or std::unordored_map. More... | |
struct | is_std_array |
Check if type T is a std::array. More... | |
struct | is_std_array_of_size |
Check if type T is a std::array of a given size. More... | |
struct | is_streamable |
Check if type T has operator<<(S , T ) defined. More... | |
struct | is_tensor_index |
Check if a type T is a TensorIndex used in TensorExpressions. More... | |
struct | is_tensor_index< TensorIndex< I > > |
struct | is_tensor_index_type |
Inherits from std::true_type if T is a TensorIndexType. More... | |
struct | is_time_index |
Check if a type T is a TensorIndex representing a concrete time index. More... | |
struct | is_time_index< std::decay_t< decltype(ti::T)> > |
struct | is_time_index< std::decay_t< decltype(ti::t)> > |
struct | remove_cvref_wrap |
Removes std::reference_wrapper, references, and cv qualifiers. More... | |
struct | remove_reference_wrapper |
Gets the underlying type if the type is a std::reference_wrapper, otherwise returns the type itself. More... | |
Typedefs | |
template<typename F > | |
using | function_info = implementation defined |
Returns a struct that contains the return type, argument types, and the class type if the F is a non-static member function. More... | |
template<typename T > | |
using | get_complex_or_fundamental_type_t = typename get_complex_or_fundamental_type< T >::type |
template<typename T > | |
using | is_tensor_index_type_t = typename is_tensor_index_type< T >::type |
template<typename Array > | |
using | array_size = implementation defined |
Get the size of a std::array as a std::integral_constant. More... | |
template<typename T > | |
using | get_fundamental_type_t = typename get_fundamental_type< T >::type |
template<typename T > | |
using | remove_reference_wrapper_t = typename remove_reference_wrapper< T >::type |
template<typename T > | |
using | remove_cvref_wrap_t = typename remove_cvref_wrap< T >::type |
Functions | |
template<typename U , typename T > | |
U | fast_pointer_cast (T *t) |
Cast t which is of type T* to a U . If a static_cast<U>(t) is possible, use that, otherwise use dynamic_cast<U>(t) . | |
Variables | |
template<typename T > | |
constexpr bool | is_complex_of_fundamental_v |
template<typename T > | |
constexpr bool | is_complex_or_fundamental_v |
Evaluates to true if type T is a std::complex of a fundamental type or if T is a fundamental type. More... | |
template<typename ConformingType , typename Protocol > | |
constexpr bool | conforms_to_v = conforms_to<ConformingType, Protocol>::value |
template<typename T > | |
constexpr bool | can_be_copy_constructed_v = can_be_copy_constructed<T>::value |
template<typename T > | |
constexpr bool | is_integer_v = is_integer<T>::value |
template<typename T > | |
using | has_equivalence_t = typename has_equivalence< T >::type |
template<typename T > | |
constexpr bool | has_equivalence_v = has_equivalence<T>::value |
template<typename T > | |
using | has_inequivalence_t = typename has_inequivalence< T >::type |
template<typename T > | |
constexpr bool | has_inequivalence_v = has_inequivalence<T>::value |
template<template< typename... > class U, typename T > | |
using | is_a = implementation defined |
Check if type T is a template specialization of U More... | |
template<template< typename... > class U, typename T > | |
using | is_a_t = typename is_a< U, T >::type |
template<template< typename... > class U, typename T > | |
constexpr bool | is_a_v = is_a<U, T>::value |
template<typename T , typename... Args> | |
using | is_callable_t = typename is_callable< T, Args... >::type |
template<typename T , typename... Args> | |
constexpr bool | is_callable_v = is_callable<T, Args...>::value |
template<typename T > | |
using | is_iterable_t = typename is_iterable< T >::type |
template<typename T > | |
constexpr bool | is_iterable_v = is_iterable<T>::value |
template<typename T > | |
using | is_maplike_t = typename is_maplike< T >::type |
template<typename T > | |
constexpr bool | is_maplike_v = is_maplike<T>::value |
template<typename T > | |
using | is_std_array_t = typename is_std_array< T >::type |
template<typename T > | |
constexpr bool | is_std_array_v = is_std_array<T>::value |
template<size_t N, typename T > | |
using | is_std_array_of_size_t = typename is_std_array_of_size< N, T >::type |
template<size_t N, typename T > | |
constexpr bool | is_std_array_of_size_v = is_std_array_of_size<N, T>::value |
template<typename S , typename T > | |
using | is_streamable_t = typename is_streamable< S, T >::type |
template<typename S , typename T > | |
constexpr bool | is_streamable_v = is_streamable<S, T>::value |
A collection of useful type traits.
using tt::has_equivalence_t = typedef typename has_equivalence<T>::type |
using tt::has_inequivalence_t = typedef typename has_inequivalence<T>::type |
using tt::is_callable_t = typedef typename is_callable<T, Args...>::type |
using tt::is_iterable_t = typedef typename is_iterable<T>::type |
using tt::is_maplike_t = typedef typename is_maplike<T>::type |
using tt::is_std_array_of_size_t = typedef typename is_std_array_of_size<N, T>::type |
using tt::is_std_array_t = typedef typename is_std_array<T>::type |
using tt::is_streamable_t = typedef typename is_streamable<S, T>::type |
using tt::is_tensor_index_type_t = typedef typename is_tensor_index_type<T>::type |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |