payloadEqualityTraits
Functions
-
template<typename T>
bool supportsPayloadEquality() noexcept Returns true if a field-wise equality comparison is defined for payload type T.
-
template<typename T>
bool payloadsAreEqual(const T &lhs, const T &rhs) Compare two payloads field-wise.
Will not compile for payload types that lack a PayloadEqualityTraits<T> specialization. Guard calls with supportsPayloadEquality<T>() via if constexpr, or add a specialization.
-
template<typename T>
struct PayloadEqualityTraits - #include <payloadEqualityTraits.h>
Primary template: equality comparison is not supported for this payload type by default.
Native C++ code that calls
recordOnChange()orpayloadsAreEqual()must provide a visiblePayloadEqualityTraits<T>specialization when comparison semantics can be defined safely. The generated per-payload specializations used by Python SWIG message modules are intentionally not included throughmessaging.hand are not part of the native C++ messaging API.Public Static Attributes
-
static bool supported = false
Indicates whether equality comparison is supported for this payload type.
-
static bool supported = false