Value comparison in C++

This commit is contained in:
Olivier Goffart 2021-03-18 15:26:53 +01:00
parent 8a14c4fa25
commit 09b7b92dbe
3 changed files with 35 additions and 0 deletions

View file

@ -232,6 +232,13 @@ public:
Type type() const { return cbindgen_private::sixtyfps_interpreter_value_type(&inner); }
friend bool operator==(const Value &a, const Value &b) {
return cbindgen_private::sixtyfps_interpreter_value_eq(&a.inner, &b.inner);
}
friend bool operator!=(const Value &a, const Value &b) {
return !cbindgen_private::sixtyfps_interpreter_value_eq(&a.inner, &b.inner);
}
private:
using ValueOpaque = sixtyfps::cbindgen_private::ValueOpaque;
ValueOpaque inner;