@@ -161,7 +161,7 @@ template<typename tag, typename T, T sentinel>
161161bool operator !=(const StrongId<tag,T,sentinel>& lhs, const StrongId<tag,T,sentinel>& rhs);
162162
163163template <typename tag, typename T, T sentinel>
164- bool operator <(const StrongId<tag,T,sentinel>& lhs, const StrongId<tag,T,sentinel>& rhs);
164+ bool operator <(const StrongId<tag,T,sentinel>& lhs, const StrongId<tag,T,sentinel>& rhs) noexcept ;
165165
166166
167167// Class template definition with default template parameters
@@ -198,7 +198,7 @@ class StrongId {
198198 // after the function name (i.e. <>)
199199 friend bool operator == <>(const StrongId<tag,T,sentinel>& lhs, const StrongId<tag,T,sentinel>& rhs);
200200 friend bool operator != <>(const StrongId<tag,T,sentinel>& lhs, const StrongId<tag,T,sentinel>& rhs);
201- friend bool operator < <>(const StrongId<tag,T,sentinel>& lhs, const StrongId<tag,T,sentinel>& rhs);
201+ friend bool operator < <>(const StrongId<tag,T,sentinel>& lhs, const StrongId<tag,T,sentinel>& rhs) noexcept ;
202202 private:
203203 T id_;
204204};
@@ -215,7 +215,7 @@ bool operator!=(const StrongId<tag,T,sentinel>& lhs, const StrongId<tag,T,sentin
215215
216216// Needed for std::map-like containers
217217template <typename tag, typename T, T sentinel>
218- bool operator <(const StrongId<tag,T,sentinel>& lhs, const StrongId<tag,T,sentinel>& rhs) {
218+ bool operator <(const StrongId<tag,T,sentinel>& lhs, const StrongId<tag,T,sentinel>& rhs) noexcept {
219219 return lhs.id_ < rhs.id_ ;
220220}
221221
0 commit comments