Skip to content

Commit 772c2aa

Browse files
make vtr_strong operators noexcept
1 parent 2bc3455 commit 772c2aa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

libs/libvtrutil/src/vtr_strong_id.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,10 @@ class StrongId;
160160
* friend them
161161
*/
162162
template<typename tag, typename T, T sentinel>
163-
constexpr bool operator==(const StrongId<tag, T, sentinel>& lhs, const StrongId<tag, T, sentinel>& rhs);
163+
constexpr bool operator==(const StrongId<tag, T, sentinel>& lhs, const StrongId<tag, T, sentinel>& rhs) noexcept;
164164

165165
template<typename tag, typename T, T sentinel>
166-
constexpr bool operator!=(const StrongId<tag, T, sentinel>& lhs, const StrongId<tag, T, sentinel>& rhs);
166+
constexpr bool operator!=(const StrongId<tag, T, sentinel>& lhs, const StrongId<tag, T, sentinel>& rhs) noexcept;
167167

168168
template<typename tag, typename T, T sentinel>
169169
constexpr bool operator<(const StrongId<tag, T, sentinel>& lhs, const StrongId<tag, T, sentinel>& rhs) noexcept;
@@ -228,13 +228,13 @@ class StrongId {
228228

229229
///@brief == operator
230230
template<typename tag, typename T, T sentinel>
231-
constexpr bool operator==(const StrongId<tag, T, sentinel>& lhs, const StrongId<tag, T, sentinel>& rhs) {
231+
constexpr bool operator==(const StrongId<tag, T, sentinel>& lhs, const StrongId<tag, T, sentinel>& rhs) noexcept {
232232
return lhs.id_ == rhs.id_;
233233
}
234234

235235
///@brief != operator
236236
template<typename tag, typename T, T sentinel>
237-
constexpr bool operator!=(const StrongId<tag, T, sentinel>& lhs, const StrongId<tag, T, sentinel>& rhs) {
237+
constexpr bool operator!=(const StrongId<tag, T, sentinel>& lhs, const StrongId<tag, T, sentinel>& rhs) noexcept {
238238
return !(lhs == rhs);
239239
}
240240

0 commit comments

Comments
 (0)