C++: implements operator== for StandardListViewItem

This commit is contained in:
Olivier Goffart 2020-11-01 15:56:19 +01:00
parent 1eb7203ec8
commit cc85aa818d

View file

@ -587,5 +587,13 @@ struct VersionCheckHelper
}
using cbindgen_private::StandardListViewItem;
bool operator==(const StandardListViewItem &a, const StandardListViewItem &b) {
static_assert(sizeof(StandardListViewItem) == sizeof(std::tuple<SharedString>), "This should be updated if there are more fields");
return a.text == b.text;
}
bool operator!=(const StandardListViewItem &a, const StandardListViewItem &b) {
return !(a == b);
}
} // namespace sixtyfps