Celeritas 0.7-develop+0ab295a
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Variables
TestMacrosTraits.hh File Reference
#include <string>
#include <string_view>
#include <type_traits>

Classes

struct  celeritas::testdetail::IsContainer< T, class >
 Check if type T is a container that needs recursive checking. More...
 
struct  celeritas::testdetail::IsContainer< std::string >
 
struct  celeritas::testdetail::IsContainer< std::string_view >
 
struct  celeritas::testdetail::IsContainer< T, std::void_t< typename T::const_iterator > >
 
struct  celeritas::testdetail::IsContainer< T[N]>
 
struct  celeritas::testdetail::IsRefResult< T, class >
 Whether a type is a ref result. More...
 
struct  celeritas::testdetail::IsRefResult< T, std::void_t< decltype(T::class_str[0])> >
 
struct  celeritas::testdetail::CommonPrecision< T, U >
 Get a "least common denominator" for soft comparisons. More...
 
struct  celeritas::testdetail::CommonPrecision< T, T >
 
struct  celeritas::testdetail::CommonPrecision< double, float >
 
struct  celeritas::testdetail::CommonPrecision< float, double >
 
struct  celeritas::testdetail::CommonPrecision< int, T >
 
struct  celeritas::testdetail::CommonPrecision< Constant, T >
 
struct  celeritas::testdetail::CommonPrecision< T, Constant >
 
struct  celeritas::testdetail::CommonPrecision< Constant, Constant >
 
struct  celeritas::testdetail::ValueType< T, class >
 Get the type of a container. More...
 
struct  celeritas::testdetail::ValueType< T[N]>
 
struct  celeritas::testdetail::ScalarValueType< T, class >
 Recursively get the underlying scalar type of a container. More...
 
struct  celeritas::testdetail::ScalarValueType< T, std::enable_if_t< IsContainer_v< T > > >
 

Macros

#define CELERTEST_COMMON_PRECISION(TEMPLATE, T, U, V)
 

Typedefs

template<class T , class U = T>
using celeritas::testdetail::CommonPrecision_t = typename CommonPrecision< T, U >::type
 
template<class T >
using celeritas::testdetail::ValueType_t = typename ValueType< T >::type
 
template<class T >
using celeritas::testdetail::ScalarValueType_t = typename ScalarValueType< T >::type
 

Variables

template<class T >
constexpr bool celeritas::testdetail::IsContainer_v = IsContainer<T>::value
 Whether a type is a container.
 
template<class T >
constexpr bool celeritas::testdetail::IsRefResult_v = IsRefResult<T>::value
 Whether a type is a reference result.
 
template<class T , class U >
constexpr bool celeritas::testdetail::can_soft_equiv = !std::is_void_v<CommonPrecision_t<T, U>>
 Whether soft equivalence can be performed on the given types.
 
template<class T >
constexpr bool celeritas::testdetail::IsNestedContainer_v = IsContainer_v<ValueType_t<T>>
 Whether a container holds another container.
 

Macro Definition Documentation

◆ CELERTEST_COMMON_PRECISION

#define CELERTEST_COMMON_PRECISION (   TEMPLATE,
  T,
  U,
  V 
)
Value:
template<TEMPLATE> \
struct CommonPrecision<T, U> : CommonPrecision<V> \
{ \
}