@@ -173,47 +173,47 @@ std::ostream& operator<<(std::ostream& os, const not_null<T>& val)
173173#endif // !defined(GSL_NO_IOSTREAMS)
174174
175175template <class T, class U>
176- auto operator==(const not_null<T>& lhs,
176+ constexpr auto operator==(const not_null<T>& lhs,
177177 const not_null<U>& rhs) noexcept(noexcept(lhs.get() == rhs.get()))
178178 -> decltype(lhs.get() == rhs.get())
179179{
180180 return lhs.get() == rhs.get();
181181}
182182
183183template <class T, class U>
184- auto operator!=(const not_null<T>& lhs,
184+ constexpr auto operator!=(const not_null<T>& lhs,
185185 const not_null<U>& rhs) noexcept(noexcept(lhs.get() != rhs.get()))
186186 -> decltype(lhs.get() != rhs.get())
187187{
188188 return lhs.get() != rhs.get();
189189}
190190
191191template <class T, class U>
192- auto operator<(const not_null<T>& lhs,
192+ constexpr auto operator<(const not_null<T>& lhs,
193193 const not_null<U>& rhs) noexcept(noexcept(std::less<>{}(lhs.get(), rhs.get())))
194194 -> decltype(std::less<>{}(lhs.get(), rhs.get()))
195195{
196196 return std::less<>{}(lhs.get(), rhs.get());
197197}
198198
199199template <class T, class U>
200- auto operator<=(const not_null<T>& lhs,
200+ constexpr auto operator<=(const not_null<T>& lhs,
201201 const not_null<U>& rhs) noexcept(noexcept(std::less_equal<>{}(lhs.get(), rhs.get())))
202202 -> decltype(std::less_equal<>{}(lhs.get(), rhs.get()))
203203{
204204 return std::less_equal<>{}(lhs.get(), rhs.get());
205205}
206206
207207template <class T, class U>
208- auto operator>(const not_null<T>& lhs,
208+ constexpr auto operator>(const not_null<T>& lhs,
209209 const not_null<U>& rhs) noexcept(noexcept(std::greater<>{}(lhs.get(), rhs.get())))
210210 -> decltype(std::greater<>{}(lhs.get(), rhs.get()))
211211{
212212 return std::greater<>{}(lhs.get(), rhs.get());
213213}
214214
215215template <class T, class U>
216- auto operator>=(const not_null<T>& lhs,
216+ constexpr auto operator>=(const not_null<T>& lhs,
217217 const not_null<U>& rhs) noexcept(noexcept(std::greater_equal<>{}(lhs.get(), rhs.get())))
218218 -> decltype(std::greater_equal<>{}(lhs.get(), rhs.get()))
219219{
0 commit comments