mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 22:31:14 +00:00
Fix compileation with clang
The operator== must be in the same namespace as the struct for ADL to work proprerly
This commit is contained in:
parent
cc85aa818d
commit
356cd8c3ee
1 changed files with 11 additions and 10 deletions
|
@ -579,6 +579,17 @@ Flickable::~Flickable()
|
||||||
sixtyfps_flickable_data_free(&data);
|
sixtyfps_flickable_data_free(&data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
using cbindgen_private::StandardListViewItem;
|
||||||
|
namespace cbindgen_private {
|
||||||
|
bool operator==(const StandardListViewItem &a, const StandardListViewItem &b) {
|
||||||
|
static_assert(sizeof(StandardListViewItem) == sizeof(std::tuple<SharedString>), "must update to cover all fields");
|
||||||
|
return a.text == b.text;
|
||||||
|
}
|
||||||
|
bool operator!=(const StandardListViewItem &a, const StandardListViewItem &b) {
|
||||||
|
return !(a == b);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
namespace private_api {
|
namespace private_api {
|
||||||
template<int Major, int Minor, int Patch>
|
template<int Major, int Minor, int Patch>
|
||||||
struct VersionCheckHelper
|
struct VersionCheckHelper
|
||||||
|
@ -586,14 +597,4 @@ 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
|
} // namespace sixtyfps
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue