System::TestPredicates::TypeTraits Namespace Reference

Classes

struct  LargestFPType
 Provides alias for longest floating point type provided. Ignores non-floating point types. More...
 
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< T2 >::value &&!std::is_floating_point< T1 >::value >::type >
 Specialization for case when T2 is a floating point and T1 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  has_print_to_method
 Checks for overload of PrintTo function that accepts given type as first argument. If an overload exists, inherits std::true_type, otherwise inheirts std::false_type. More...
 
struct  has_print_to_method< T, decltype((void)(PrintTo(std::declval< T & >(), std::declval< std::ostream * >())))>
 Specialization for types having PrintTo specialization provided.
 
struct  has_data_method
 Checks if a type has data() method. If it does, inherits std::true_type, otherwise inherits std::false_type. More...
 
struct  has_data_method< T, decltype((void)(std::declval< T >().data()))>
 Specialization for types having data() method.
 
struct  has_data_method< System::Collections::BitArray, void >
 Specialization for BitArray type which provides boost type which is inaccessible there. More...
 
struct  IsEnumerable
 Checks if type has System::Collections::Generic::IEnumerable specialization as basetype. If so, value member is set to true, otherwise it is set to false. More...
 
struct  IsEnumerable< T, decltype((void)(std::declval< typename T::ValueType >()))>
 Specializations for IEnumerable types.
 
struct  IsCppContainer
 Checks if specific type is STL-style container. To do so, checks for iterator and const_iterator member types existance. If both exist, inherits std::true_type, otherwise inherits std::false_type. More...
 
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.
 

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) >
 Checks that T1 is arithmetic and T2 is floating point, or vice versa. If so, sets value member to true, otherwise it is false. More...
 
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 >
 Checks that at least one of type arguments is System::Decimal. If so, sets value member to true, otherwise it is false. More...
 
template<typename T >
using IsArray = 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. More...
 
template<typename T >
using IsList = 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. More...
 
template<typename T1 , typename T2 >
using BothArrayOrList = 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. More...
 
template<typename T1 , typename T2 >
using BothEnumerable = 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. More...
 

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.