ReferenceEquals()
Contents
[
Hide
]Object::ReferenceEquals(String const&, std::nullptr_t) method
Specialization of Object::ReferenceEquals for case of string and nullptr.
bool System::Object::ReferenceEquals(String const &str, std::nullptr_t)
Arguments
Parameter | Type | Description |
---|---|---|
str | String const& | String to compare to nullptr. |
Return Value
true if string is null, false otherwise.
Object::ReferenceEquals(String const&, String const&) method
Specialization of Object::ReferenceEquals for case of strings.
bool System::Object::ReferenceEquals(String const &str1, String const &str2)
Arguments
Parameter | Type | Description |
---|---|---|
str1 | String const& | First string to compare. |
str2 | String const& | Second string to compare. |
Return Value
true if strings match, false otherwise.
Object::ReferenceEquals(ptr const&, ptr const&) method
Compares objects by reference.
static bool System::Object::ReferenceEquals(ptr const &objA, ptr const &objB)
Arguments
Parameter | Type | Description |
---|---|---|
objA | ptr const& | First pointer to compare. |
objB | ptr const& | Second pointer to compare. |
Return Value
True if pointers match and false otherwise.
Object::ReferenceEquals(T const&, T const&) method
Compares objects by reference.
template<typename T> static std::enable_if<!IsSmartPtr<T>::value, bool>::type System::Object::ReferenceEquals(T const &objA, T const &objB)
Template parameters
Parameter | Description |
---|---|
T | Type of objects to compare. |
Arguments
Parameter | Type | Description |
---|---|---|
objA | T const& | First object to compare. |
objB | T const& | Second object to compare. |
Return Value
True if object addresses match and false otherwise.
Object::ReferenceEquals(T const&, std::nullptr_t) method
Reference-compares value type object with nullptr.
template<typename T> static std::enable_if<!IsSmartPtr<T>::value, bool>::type System::Object::ReferenceEquals(T const &objA, std::nullptr_t)
Template parameters
Parameter | Description |
---|---|
T | Type of object to compare. |
Arguments
Parameter | Type | Description |
---|---|---|
objA | T const& | First object to compare. |
Return Value
Always returns false as value types cannot be nulled.
See Also
- Typedef ptr
- Class String
- Class Object
- Struct IsSmartPtr
- Namespace System
- Library Aspose.Slides