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

Issues compiling with exceptions disabled #129

Closed
andy-byers opened this issue Jan 15, 2023 · 1 comment
Closed

Issues compiling with exceptions disabled #129

andy-byers opened this issue Jan 15, 2023 · 1 comment

Comments

@andy-byers
Copy link
Contributor

andy-byers commented Jan 15, 2023

I've noticed the following two things when compiling with -fno-exceptions:

  1. An unused parameter warning on line 202 in expected.hpp (using b74fecd for reference, but it's the same with v1.0.0)
  2. The second one is a "use of a deleted function" error (I added a test in my PR that should demonstrate it)

Hopefully that makes sense. Thanks for the great library!

andy-byers pushed a commit to andy-byers/expected that referenced this issue Jan 15, 2023
+ Added a `[maybe_unused]` attribute to get rid of an unused parameter warning
+ Moving the parameter into `assign_common()` in the rvalue reference overload of `assign()`
+ Added a compile guard to `swap.cpp` to allow compilation with `-fno-exceptions`
andy-byers pushed a commit to andy-byers/expected that referenced this issue Jan 15, 2023
+ Fixed unused variable warning
+ Added a `std::move` to avoid calling copy-assignment operator on non-copyable types
TartanLlama pushed a commit that referenced this issue Feb 15, 2023
+ Fixed unused variable warning
+ Added a `std::move` to avoid calling copy-assignment operator on non-copyable types

Co-authored-by: andy-byers <andrew.byers@utdallas.edu>
@andy-byers
Copy link
Contributor Author

Everything works as expected when compiling with -fno-exceptions

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

No branches or pull requests

1 participant