We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Code to reproduce:
#include <https://raw.githubusercontent.com/martinmoene/optional-lite/master/include/nonstd/optional.hpp> #include <iostream> struct Type { Type(int) { std::cout << "construct" << std::endl; } Type(Type &&) { std::cout << "move" << std::endl; } ~Type() { std::cout << "destruct" << std::endl; } }; int main() { nonstd::optional<Type> t(0); return t.has_value(); }
Expected:
construct destruct
Output:
construct move destruct destruct
Live code: https://godbolt.org/z/5T575q (gcc 7.5 vs gcc latest output)
The text was updated successfully, but these errors were encountered:
[skip ci] Add tests for issue #59, thanks @deadem
cf1ed68
Fix direct-initializing a optional value (#59, thanks @deadem)
2981e20
Add tests to ensure balanced construction-destruction (#59, thanks @d…
b3749a8
…eadem)
In release v3.4.0
Sorry, something went wrong.
No branches or pull requests
Code to reproduce:
Expected:
Output:
Live code: https://godbolt.org/z/5T575q (gcc 7.5 vs gcc latest output)
The text was updated successfully, but these errors were encountered: