CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
System::detail Namespace Reference

Classes

struct  cast_statically_or_dynamically
 Performs cheapest cast possible from static_cast and dynamic_cast. More...
 
struct  cast_statically_or_dynamically< From, To, true >
 Performs cheapest cast possible from static_cast and dynamic_cast. Specialization for convertible = true;. More...
 
struct  has_method_compareto_via_arrow
 Checks whether CompareTo method exists in the specified type returned by operator ->. If so, inherits std::true_type, otherwise inherits std::false_type. Can be used in std::enable_if. More...
 
struct  has_method_compareto_via_arrow< T, decltype((void)(std::declval< T & >() ->CompareTo(*static_cast< T * >(nullptr))))>
 Specialization for existing CompareTo method.
 
struct  has_method_compareto_via_dot
 Checks whether CompareTo method exists in the specified type. If so, inherits std::true_type, otherwise inherits std::false_type. Can be used in std::enable_if. More...
 
struct  has_method_compareto_via_dot< T, decltype((void)(std::declval< T & >().CompareTo(*static_cast< T * >(nullptr))))>
 Specialization for existing CompareTo method.
 
struct  has_method_equals
 Checks whether Equals method exists in specified type. If so, inherits std::true_type, otherwise inherits std::false_type. Can be used in std::enable_if. More...
 
struct  has_method_equals< T, decltype((void)(std::declval< T & >().Equals(std::declval< T & >())))>
 Specialization for existing Equals method.
 
struct  has_method_get_Count
 Checks whether get_Count method exists. If so, inherits std::true_type, otherwise inherits std::false_type. Can be used in std::enable_if. More...
 
struct  has_method_get_Count< T, decltype((void)(std::declval< T & >() ->get_Count()))>
 Specialization for existing get_Count method.
 
struct  has_method_gethashcode
 Checks whether GetHashCode method exists in specified type. If so, inherits std::true_type, otherwise inherits std::false_type. Can be used in std::enable_if. More...
 
struct  has_method_gethashcode< T, decltype((void)(std::declval< T & >().GetHashCode()))>
 Specialization for existing GetHashCode method.
 
struct  has_method_is_null
 Checks whether IsNull method exists. If so, inherits std::true_type, otherwise inherits std::false_type. Can be used in std::enable_if. More...
 
struct  has_method_is_null< T, decltype((void)(std::declval< T & >().IsNull()))>
 Specialization for existing IsNull method.
 
struct  has_no_operator_equal
 Checks whether operator == not defined neither for T, not for U types. Can be used in std::enable_if. More...
 
struct  has_operator_equal
 Checks whether operator == exists in specified type. If so, inherits std::true_type, otherwise inherits std::false_type. Can be used in std::enable_if. More...
 
struct  has_operator_equal_impl
 Implementation for has_operator_equal. More...
 
struct  has_operator_less
 Checks whether operator < exists in specified type. If so, inherits std::true_type, otherwise inherits std::false_type. Can be used in std::enable_if. More...
 
struct  has_operator_less< T, decltype((void)(std::declval< T & >()< std::declval< T & >()))>
 Specialization for existing operator < .
 
struct  has_print_to_function
 Checks whether PrintTo function exists for specified type. If so, inherits std::true_type, otherwise inherits std::false_type. Can be used in std::enable_if. More...
 
struct  has_print_to_function< T, decltype((void)(PrintTo(std::declval< T & >(), std::declval< std::ostream * >())))>
 Specialization for existing PrintTo function.
 
struct  has_ref_method_gethashcode
 Checks whether GetHashCode method exists in type returned by specified type's operator ->. If so, inherits std::true_type, otherwise inherits std::false_type. Can be used in std::enable_if. More...
 
struct  has_ref_method_gethashcode< T, decltype((void)(std::declval< T & >() ->GetHashCode()))>
 Specialization for existing GetHashCode method.
 
struct  is_a
 Tests if specific type is a specialization of specific template. If it is, inherits std::true_type, otherwise inherits std::false_type. More...
 
struct  is_a< Tested &&, TypeToBe >
 Specialization for rvalue references. More...
 
struct  is_a< Tested &, TypeToBe >
 Specialization for lvalue references. More...
 
struct  Is_A_Internal
 Helper class to check if specific type is a specialization of a given template. More...
 
struct  is_pointer_convertible
 Checks if pointers are implicitly convertible. Workaround for VS implementation of std::is_convertible which instantiates all pointed types to full extent. More...
 

Typedefs

template<class From , class To >
using is_static_castable = decltype(IsStaticCastable_Internal< From, To >(0))
 Checks if static_cast works between two types. If possible, typedefs std::true_type, otherwise typedefs std::false_type. More...
 
template<typename T >
using has_only_method_equals = std::integral_constant< bool, has_method_equals< T >::value &&!has_operator_equal< T >::value >
 Checks whether specific type has Equals method but not operator ==. If so, value member is true, otherwise it is false. More...
 

Functions

template<class From , class To , class = decltype(static_cast<To*>((From*)nullptr))>
std::true_type IsStaticCastable_Internal (int)
 SFINAE to check if static_cast works between two types. More...
 
template<class From , class To >
std::false_type IsStaticCastable_Internal (...)
 SFINAE to check if static_cast works between two types. More...
 

Typedef Documentation

◆ has_only_method_equals

template<typename T >
using System::detail::has_only_method_equals = typedef std::integral_constant<bool, has_method_equals<T>::value && !has_operator_equal<T>::value>

Checks whether specific type has Equals method but not operator ==. If so, value member is true, otherwise it is false.

Template Parameters
TType to check.

◆ is_static_castable

template<class From , class To >
using System::detail::is_static_castable = typedef decltype(IsStaticCastable_Internal<From, To>(0))

Checks if static_cast works between two types. If possible, typedefs std::true_type, otherwise typedefs std::false_type.

Template Parameters
FromSource type.
ToDestination type.

Function Documentation

◆ IsStaticCastable_Internal() [1/2]

template<class From , class To >
std::false_type System::detail::IsStaticCastable_Internal (   ...)

SFINAE to check if static_cast works between two types.

Template Parameters
FromSource type.
ToDestination type.

◆ IsStaticCastable_Internal() [2/2]

template<class From , class To , class = decltype(static_cast<To*>((From*)nullptr))>
std::true_type System::detail::IsStaticCastable_Internal ( int  )

SFINAE to check if static_cast works between two types.

Template Parameters
FromSource type.
ToDestination type.