Theoretica
A C++ numerical and automatic mathematical library
|
Fundamental type traits. More...
Go to the source code of this file.
Namespaces | |
theoretica | |
Main namespace of the library which contains all functions and objects. | |
Typedefs | |
template<typename ... Args> | |
using | theoretica::_internal::void_t = typename make_void< Args... >::type |
template<typename Structure > | |
using | theoretica::vector_element_or_void_t = typename _internal::vector_element_or_void< Structure >::type |
Extract the type of a vector (or any indexable container) from its operator[], returning void if the type has no operator[]. | |
template<typename Structure > | |
using | theoretica::vector_element_t = std::remove_reference_t< decltype(std::declval< Structure >()[0])> |
Extract the type of a vector (or any indexable container) from its operator[]. | |
template<typename Structure > | |
using | theoretica::matrix_element_t = std::remove_reference_t< decltype(std::declval< Structure >()(0, 0))> |
Extract the type of a matrix (or any doubly indexable container) from its operator(). | |
template<typename Structure > | |
using | theoretica::has_real_elements = is_real_type< vector_element_t< Structure > > |
Type trait to check whether an indexable container has real elements. | |
template<typename Structure , typename T = bool> | |
using | theoretica::enable_matrix = std::enable_if_t< is_matrix< Structure >::value, T > |
Enable a function overload if the template typename is considerable a matrix. More... | |
template<typename Structure , typename T = bool> | |
using | theoretica::enable_vector = std::enable_if_t< is_vector< Structure >::value, T > |
Enable a function overload if the template typename is considerable a vector. More... | |
template<typename Function > | |
using | theoretica::is_real_func = std::conditional_t< is_real_type< typename _internal::return_type_or_void< Function, real >::type >::value, std::true_type, std::false_type > |
Type trait to check whether the given function takes a real number as its first argument. | |
template<typename Function , typename T = bool> | |
using | theoretica::enable_real_func = typename std::enable_if_t< is_real_func< Function >::value, T > |
Enable a certain function overload if the given type is a function taking as first argument a real number. | |
template<typename Function > | |
using | theoretica::return_type_t = typename _internal::func_helper< Function >::return_type |
Extract the return type of a Callable object, such as a function pointer or lambda function. | |
Fundamental type traits.