SOFA API  fdacdac3
Open source framework for multi-physics simuation
sofa::type::trait Namespace Reference

Classes

struct  is_container
 Detect if a type T has iterator/const iterator function. More...
 
struct  is_fixed_array
 Detect if a type T has iterator/const iterator function, operator[](size_t) and defines a static size. More...
 
struct  is_specialization_of
 Trait to check if a type T is a specialization of a given template class Template. More...
 
struct  is_specialization_of< Template< Args... >, Template >
 Partial specialization for the case where T is an instance of Template<Args...>. More...
 
struct  is_vector
 Detect if a type T has iterator/const iterator function, operator[](size_t) and is dynamically resizable (resize function) More...
 

Variables

template<typename T , template< typename... > class Template>
constexpr bool is_specialization_of_v = is_specialization_of<T, Template>::value
 Helper variable template to simplify the syntax for checking if T is a specialization of Template. More...
 

Variable Documentation

◆ is_specialization_of_v

template<typename T , template< typename... > class Template>
constexpr bool sofa::type::trait::is_specialization_of_v = is_specialization_of<T, Template>::value
inlineconstexpr

Helper variable template to simplify the syntax for checking if T is a specialization of Template.

This variable template provides a cleaner and more concise way to use the is_specialization_of trait. Instead of writing is_specialization_of<T, Template>::value, you can use is_specialization_of_v<T, Template>.

Template Parameters
TThe type to be checked.
TemplateThe template class to check against.
See also
is_specialization_of