KDDockWidgets API Documentation 2.0
|
An instance of the KDBindings::equal_to struct is used to decide whether two values of type T are equal in the context of data binding. More...
#include <property.h>
Public Member Functions | |
auto | operator() (const T &x, const T &y) const noexcept -> std::enable_if_t< Private::are_equality_comparable_v< T, T >, bool > |
template<typename X , typename Y > | |
auto | operator() (const X &, const Y &) const noexcept -> std::enable_if_t<!Private::are_equality_comparable_v< X, Y >, bool > |
An instance of the KDBindings::equal_to struct is used to decide whether two values of type T are equal in the context of data binding.
If a new value is assigned to a Property and the existing value is equal_to the existing value, the Property will not emit the Property::valueChanged or Property::valueAboutToChange signals and not change the stored value.
By default, all classes T that are equality comparable using std::equal_to delegate to std::equal_to for equality comparison. All other instances are assumed to never be equal. Therefore, to change the equality behavior of a Property<T>, either:
Definition at line 78 of file property.h.
|
inlinenoexcept |
This implementation of operator()() is only enabled if std::equal_to can be used to compare values of type T. In this case, std::equal_to is used to decide whether values of type T are equal.
Definition at line 86 of file property.h.
|
inlinenoexcept |
The fallback implementation of operator()() if the types are not equality comparable using std::equal_to (i.e. no operator== implementation exists for this type). In this case, two values of type T are assumed to never be equal.
Definition at line 100 of file property.h.