remove gcc noexcept warning (#1122)
commit87e21400dc695e45412fb0a512c73d8d4aaa2d5b
authorWerner Henze <34543625+beinhaerter@users.noreply.github.com>
Wed, 28 Jun 2023 22:17:12 +0000 (29 00:17 +0200)
committerGitHub <noreply@github.com>
Wed, 28 Jun 2023 22:17:12 +0000 (28 15:17 -0700)
tree1597f61948be5a6383db87757403c20d6303c87f
parent3549e31ba4001ce2283593301df58fab186899ee
remove gcc noexcept warning (#1122)

Without this change a `gsl::not_null<class_type>` triggers these `noexcept` warnings:
```
.../gsl/include/gsl/pointers:162:50: warning: noexcept-expression evaluates to ‘false’ because of a call to ‘constexpr gsl::details::value_or_reference_return_t<T> gsl::not_null<T>::get() const [with T = class_type*; gsl::details::value_or_reference_return_t<T> = class_type* const]’ [-Wnoexcept]
  162 |                 const not_null<U>& rhs) noexcept(noexcept(lhs.get() == rhs.get()))
      |                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.../gsl/include/gsl/pointers:119:55: note: but ‘constexpr gsl::details::value_or_reference_return_t<T> gsl::not_null<T>::get() const [with T = class_type*; gsl::details::value_or_reference_return_t<T> = class_type* const]’ does not throw; perhaps it should be declared ‘noexcept’
  119 |     constexpr details::value_or_reference_return_t<T> get() const
      |                                                       ^~~
```

Co-authored-by: Werner Henze <w.henze@avm.de>
include/gsl/pointers