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

Classes

class  Comparable
 Simple implementation of IComparable<> More...
 
struct  ImplementsInterface
 Template predicate that checks if boxed object should implement given interface by itself. More...
 
struct  ImplementsInterface< String, IComparable< String > >
 String implements IComparable. More...
 
struct  ImplementsInterface< T, IComparable< T > >
 Template predicate that checks if boxed object should implement IComparable interface by itself. More...
 
class  NonComparable
 Dummy base type for boxed types what do not implement IComparable<> More...
 

Functions

template<typename T >
std::enable_if< detail::has_operator_equal< T >::value, bool >::type Equals (T value1, T value2)
 Determines the equality of the specified value using operator==(). More...
 
template<typename T >
std::enable_if< detail::has_only_method_equals< T >::value, bool >::type Equals (T value1, T value2)
 Determines the equality of the specified value using method System::Object::Equals(). More...
 
template<>
bool Equals< float > (float value1, float value2)
 Compares two single-precision floating-point values. More...
 
template<>
bool Equals< double > (double value1, double value2)
 Compares two double-precision floating-point values. More...
 

Variables

template<typename T , typename InterfaceT >
constexpr bool ImplementsInterface_v = ImplementsInterface<T, InterfaceT>::value
 Template helper variable. More...
 

Function Documentation

◆ Equals() [1/2]

template<typename T >
std::enable_if< detail::has_operator_equal< T >::value, bool >::type System::BoxedValueDetail::Equals ( value1,
value2 
)

Determines the equality of the specified value using operator==().

Parameters
value1The first comparand
value2The second comparand
Returns
True if the specified value are equal as determined by operator==(), otherwise - false
Template Parameters
Thetype of the values being compared

◆ Equals() [2/2]

template<typename T >
std::enable_if< detail::has_only_method_equals< T >::value, bool >::type System::BoxedValueDetail::Equals ( value1,
value2 
)

Determines the equality of the specified value using method System::Object::Equals().

Parameters
value1The first comparand
value2The second comparand
Returns
True if the specified value are equal as determined by method Equals(), otherwise - false
Template Parameters
Thetype of the values being compared

◆ Equals< double >()

template<>
bool System::BoxedValueDetail::Equals< double > ( double  value1,
double  value2 
)
inline

Compares two double-precision floating-point values.

Parameters
value1The first value to compare
value2The second value to compare
Returns
True if both values are NAN or are equal, otherwise - false

◆ Equals< float >()

template<>
bool System::BoxedValueDetail::Equals< float > ( float  value1,
float  value2 
)
inline

Compares two single-precision floating-point values.

Parameters
value1The first value to compare
value2The second value to compare
Returns
True if both values are NAN or are equal, otherwise - false

Variable Documentation

◆ ImplementsInterface_v

template<typename T , typename InterfaceT >
constexpr bool System::BoxedValueDetail::ImplementsInterface_v = ImplementsInterface<T, InterfaceT>::value
constexpr

Template helper variable.