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

Fix some Clang warnings #73

Merged
merged 2 commits into from
Dec 9, 2024
Merged

Conversation

Quuxplusone
Copy link
Contributor

A plain cmake .. ; make on OSX with the stock Clang gives some warnings that look easy to fix; so, I fixed them.

The second commit, re decltype( get_unexpected().value() ), merits a close look, because the old code seems so weird (your code using a method that you yourself deprecated). There might be something sneaky going on there.

    warning: unused variable 'nullopt' [-Wunused-const-variable]
     2284 | const nullopt_t nullopt{};
          |                 ^~~~~~~

    warning: unused variable 'u' [-Wunused-variable]
      610 |     nonstd::unexpected<int> u{7};
          |                             ^
Clang complains:

    warning: 'value' is deprecated: replace value() with error() [-Wdeprecated-declarations]
     2333 |         using ContainedEx = typename std::remove_reference< decltype( get_unexpected().value() ) >::type;
          |                                                                                        ^
@martinmoene martinmoene merged commit 5cea391 into martinmoene:master Dec 9, 2024
7 checks passed
@martinmoene
Copy link
Owner

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants