Equals()
ObjectExt::Equals(const T&, const T2&) method
template<typename T,typename T2> static std::enable_if<IsExceptionWrapper<T>::value, bool>::type System::ObjectExt::Equals(const T &obj, const T2 &another)
ObjectExt::Equals(const T&, const T2&) method
Substitution for C# Object.Equals calls working for any type in C++. Overload for smart pointer types.
template<typename T,typename T2> static std::enable_if<IsSmartPtr<T>::value, bool>::type System::ObjectExt::Equals(const T &obj, const T2 &another)
Template parameters
Parameter | Description |
---|---|
T | First object type. |
T2 | Second object type. |
Arguments
Parameter | Type | Description |
---|---|---|
obj | const T& | First object. |
another | const T2& | Second object. |
Return Value
True if objects are considered equal, false otherwise.
ObjectExt::Equals(T, const T2&) method
Substitution for C# Object.Equals calls working for any type in C++. Overload for structure types.
template<typename T,typename T2> static std::enable_if<!IsExceptionWrapper<T>::value &&!IsSmartPtr<T>::value &&!std::is_scalar<T>::value, bool>::type System::ObjectExt::Equals(T obj, const T2 &another)
Template parameters
Parameter | Description |
---|---|
T | First object type. |
T2 | Second object type. |
Arguments
Parameter | Type | Description |
---|---|---|
obj | T | First object. |
another | const T2& | Second object. |
Return Value
True if objects are considered equal, false otherwise.
ObjectExt::Equals(const T&, const T2&) method
Substitution for C# Object.Equals calls working for any type in C++. Overload for scalar types.
template<typename T,typename T2> static std::enable_if<!IsSmartPtr<T>::value &&std::is_scalar<T>::value, bool>::type System::ObjectExt::Equals(const T &obj, const T2 &another)
Template parameters
Parameter | Description |
---|---|
T | First object type. |
T2 | Second object type. |
Arguments
Parameter | Type | Description |
---|---|---|
obj | const T& | First object. |
another | const T2& | Second object. |
Return Value
True if objects are considered equal, false otherwise.
ObjectExt::Equals(const char_t(&), String) method
Substitution for C# Object.Equals calls working for any type in C++. Overload for string literal with string comparison.
template<size_t> static bool System::ObjectExt::Equals(const char_t(&obj)[N], String another)
Template parameters
Parameter | Description |
---|---|
N | String literal size. |
Arguments
Parameter | Type | Description |
---|---|---|
obj | const char_t(&) | String literal. |
another | String | String. |
Return Value
True if strings match, false otherwise.
ObjectExt::Equals(const float&, const float&) method
Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN.
bool System::ObjectExt::Equals(const float &obj, const float &another)
Arguments
Parameter | Type | Description |
---|---|---|
obj | const float& | LHS floating point value. |
another | const float& | RHS floating point value. |
Return Value
True if obj and another are both NaN or equal, false otherwise.
ObjectExt::Equals(const double&, const double&) method
Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN.
bool System::ObjectExt::Equals(const double &obj, const double &another)
Arguments
Parameter | Type | Description |
---|---|---|
obj | const double& | LHS floating point value. |
another | const double& | RHS floating point value. |
Return Value
True if obj and another are both NaN or equal, false otherwise.
See Also
- Class ObjectExt
- Class String
- Struct IsExceptionWrapper
- Struct IsSmartPtr
- Namespace System
- Library Aspose.Slides