Skip to content

Commit dc2c953

Browse files
committed
report base: add comparison operator
1 parent 54c07ed commit dc2c953

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

hid-rp/hid/report.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ class selector
8181
struct id_base
8282
{
8383
report::id id;
84+
bool operator==(const id_base& other) const = default;
8485
};
8586

8687
/// @brief Base type for report storage structures.
@@ -106,6 +107,7 @@ struct base : public std::conditional_t<REPORT_ID != 0, id_base, std::monostate>
106107
constexpr base()
107108
requires(not has_id())
108109
{}
110+
bool operator==(const base& other) const = default;
109111
};
110112
static_assert(base<type::INPUT, 0>().selector() == selector(0x100));
111113
static_assert(base<type::OUTPUT, 0x42>().selector() == selector(0x242));

0 commit comments

Comments
 (0)