C++: use default operator==

Since we now use C++20, we can simplify our code a bit
This commit is contained in:
Olivier Goffart 2022-01-24 15:46:39 +01:00 committed by Olivier Goffart
parent 36e07b8801
commit 319704d3fb
8 changed files with 13 additions and 75 deletions

View file

@ -352,7 +352,12 @@ fn gen_corelib(
config.export.body.insert(
"LayoutInfo".to_owned(),
" inline LayoutInfo merge(const LayoutInfo &other) const;
friend inline LayoutInfo operator+(const LayoutInfo &a, const LayoutInfo &b) { return a.merge(b); }".into(),
friend inline LayoutInfo operator+(const LayoutInfo &a, const LayoutInfo &b) { return a.merge(b); }
friend bool operator==(const LayoutInfo&, const LayoutInfo&) = default;".into(),
);
config.export.body.insert(
"StandardListViewItem".to_owned(),
"friend bool operator==(const StandardListViewItem&, const StandardListViewItem&) = default;".into(),
);
config
.export