![]() |
Shamrock 2025.10.0
Astrophysical Code
|
Traits for C++ types. More...
Include dependency graph for type_traits.hpp:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Classes | |
| struct | shambase::has_bitlen< T, num > |
| Check if a type has a certain number of bits. More... | |
| class | shambase::has_operator_self_geq< T > |
Checks if the type T has an operator ">=" defined for self-comparison. More... | |
| class | shambase::has_operator_self_leq< T > |
Checks if the type T has an operator "<=" defined for self-comparison. More... | |
| class | shambase::has_operator_self_greater_than< T > |
Checks if the type T has an operator ">" defined for self-comparison. More... | |
| class | shambase::has_operator_self_less_than< T > |
Checks if the type T has an operator "<" defined for self-comparison. More... | |
Namespaces | |
| namespace | shambase |
| namespace for basic c++ utilities | |
Functions | |
| template<class signature , class Func > | |
| constexpr void | shambase::check_functor_nocapture (Func &&func) |
| Check if a lambda or a function has the correct signature. | |
| template<class RetType , class... Targ, class Func > | |
| constexpr void | shambase::check_functor_nocapture_deduce (Func &&func, Targ...) |
| Check if a callable object has the correct deduced signature. | |
| template<class RetType , class... Targ, class Func > | |
| constexpr void | shambase::check_functor_signature (Func &&func) |
| Check if a callable object has the correct deduced signature. | |
| template<class... Targ, class Func > | |
| constexpr void | shambase::check_functor_signature_noreturn (Func &&func) |
| variant of check_functor_signature that does not check the return type | |
| template<class RetType , class... Targ, class Func > | |
| constexpr void | shambase::check_functor_signature_deduce (Func &&func, Targ...) |
| Check if a callable object has the correct deduced signature. | |
| template<class... Targ, class Func > | |
| constexpr void | shambase::check_functor_signature_deduce_noreturn (Func &&func, Targ...) |
| variant of check_functor_signature_deduce that does not check the return type | |
| template<class... Targ2, class... Targ, class Func > | |
| constexpr void | shambase::check_functor_signature_deduce_noreturn_add_t (Func &&func, Targ...) |
| variant of check_functor_signature_deduce that does not check the return type and where some types can be specified manually | |
Variables | |
| template<class T > | |
| constexpr u64 | shambase::bitsizeof = sizeof(T) * CHAR_BIT |
| Number of bits in a type T. | |
| template<typename T , int num> | |
| constexpr bool | shambase::has_bitlen_v = has_bitlen<T, num>::value |
| Helper variable template for has_bitlen. | |
| template<class > | |
| constexpr bool | shambase::always_false_v = false |
| Helper variable template that is always false. Especially useful to perform static asserts based on templates. | |
| template<bool val, class type > | |
| constexpr bool | shambase::typed_false_v = val |
| Helper variable template that is used to associate a type to a boolean value in the compile logs. | |
Traits for C++ types.
This file contains utility traits classes for C++ types.
Definition in file type_traits.hpp.