Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove gcc noexcept warning #1122

Merged
merged 1 commit into from
Jun 28, 2023
Merged

remove gcc noexcept warning #1122

merged 1 commit into from
Jun 28, 2023

Commits on Jun 27, 2023

  1. remove gcc noexcept warning

    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
          |                                                       ^~~
    ```
    Werner Henze committed Jun 27, 2023
    Configuration menu
    Copy the full SHA
    eb56a48 View commit details
    Browse the repository at this point in the history