System::TestPredicates::TypeTraits Namespace Reference

Classes

struct  has_data_method
 
struct  has_data_method< System::Collections::BitArray, void >
 Specialization for BitArray type which provides boost type which is inaccessible there. More...
 
struct  has_data_method< T, decltype((void)(std::declval< T >().data()))>
 Specialization for types having data() method.
 
struct  has_print_to_method
 
struct  has_print_to_method< T, decltype((void)(PrintTo(std::declval< T & >(), std::declval< std::ostream * >())))>
 Specialization for types having PrintTo specialization provided.
 
struct  IsCppContainer
 
struct  IsCppContainer< T, decltype(std::declval< typename T::iterator >(), std::declval< typename T::const_iterator >(), void(0))>
 Specialization for types providing iterator and const_iterator member types.
 
struct  IsEnumerable
 
struct  IsEnumerable< T, decltype((void)(std::declval< typename T::ValueType >()))>
 Specializations for IEnumerable types.
 
struct  LargestFPType
 
struct  LargestFPType< T1, T2, typename std::enable_if< std::is_floating_point< T1 >::value &&!std::is_floating_point< T2 >::value >::type >
 Specialization for case when T1 is a floating point and T2 is not.
 
struct  LargestFPType< T1, T2, typename std::enable_if< std::is_floating_point< T1 >::value &&std::is_floating_point< T2 >::value >::type >
 Specialization for case when both T1 and T2 are floating point types.
 
struct  LargestFPType< T1, T2, typename std::enable_if< std::is_floating_point< T2 >::value &&!std::is_floating_point< T1 >::value >::type >
 Specialization for case when T2 is a floating point and T1 is not.
 

Typedefs

template<typename T1 , typename T2 >
using AreFPandArithmetic = std::integral_constant< bool,(std::is_floating_point< T1 >::value &&std::is_arithmetic< T2 >::value)||(std::is_arithmetic< T1 >::value &&std::is_floating_point< T2 >::value) >
 
template<typename T1 , typename T2 >
using AnyOfDecimal = std::integral_constant< bool, std::is_same< T1, System::Decimal >::value||std::is_same< T2, System::Decimal >::value >
 
template<typename T >
using IsArray = std::is_same< T, System::Array< typename T::ValueType > >
 
template<typename T >
using IsList = std::is_same< T, System::Collections::Generic::List< typename T::ValueType > >
 
template<typename T1 , typename T2 >
using BothArrayOrList = std::integral_constant< bool,(IsArray< T1 >::value||IsList< T1 >::value) &&(IsArray< T2 >::value||IsList< T2 >::value)>
 
template<typename T1 , typename T2 >
using BothEnumerable = std::integral_constant< bool, IsEnumerable< T1 >::value &&IsEnumerable< T2 >::value >
 

Typedef Documentation

◆ AnyOfDecimal

template<typename T1 , typename T2 >
using System::TestPredicates::TypeTraits::AnyOfDecimal = typedef std::integral_constant<bool, std::is_same<T1, System::Decimal>::value || std::is_same<T2, System::Decimal>::value>

Checks that at least one of type arguments is System::Decimal. If so, sets value member to true, otherwise it is false.

Template Parameters
T1First type to check.
T2Second type to check.

◆ AreFPandArithmetic

template<typename T1 , typename T2 >
using System::TestPredicates::TypeTraits::AreFPandArithmetic = typedef std::integral_constant<bool, (std::is_floating_point<T1>::value && std::is_arithmetic<T2>::value) || (std::is_arithmetic<T1>::value && std::is_floating_point<T2>::value) >

Checks that T1 is arithmetic and T2 is floating point, or vice versa. If so, sets value member to true, otherwise it is false.

Template Parameters
T1First type to check.
T2Second type to check.

◆ BothArrayOrList

template<typename T1 , typename T2 >
using System::TestPredicates::TypeTraits::BothArrayOrList = typedef std::integral_constant<bool, (IsArray<T1>::value || IsList<T1>::value) && (IsArray<T2>::value || IsList<T2>::value)>

Checks if both type arguments are arrays or lists. If so, value member is set to true, otherwise it is set to false.

Template Parameters
TType to check.
T1First type to check.
T2Second type to check.

◆ BothEnumerable

template<typename T1 , typename T2 >
using System::TestPredicates::TypeTraits::BothEnumerable = typedef std::integral_constant<bool, IsEnumerable<T1>::value && IsEnumerable<T2>::value>

Checks if both type arguments are IEnumerable. If so, value member is set to true, otherwise it is set to false.

Template Parameters
TType to check.
T1First type to check.
T2Second type to check.

◆ IsArray

template<typename T >
using System::TestPredicates::TypeTraits::IsArray = typedef std::is_same<T, System::Array<typename T::ValueType> >

Checks if type is a System::Array specialization. If so, value member is set to true, otherwise it is set to false.

Template Parameters
TType to check.

◆ IsList

template<typename T >
using System::TestPredicates::TypeTraits::IsList = typedef std::is_same<T, System::Collections::Generic::List<typename T::ValueType> >

Checks if type is a System::Collections::Generic::List specialization. If so, value member is set to true, otherwise it is set to false.

Template Parameters
TType to check.