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
Hi.
Looks like if a type is not trivially move-constructible, then tl::expected<T, ...> is not move-constructible at all. Is this behavior intended?
tl::expected<T, ...>
Here is an example tested with the current master branch and gcc 11.1
#include "expected.hpp" struct user_provided_move { user_provided_move() = default; user_provided_move(user_provided_move&&) noexcept {} }; struct defaulted_move { defaulted_move() = default; defaulted_move(defaulted_move&&) noexcept = default; }; int main() { tl::expected<user_provided_move, int> t1; tl::expected<defaulted_move, int> t2; tl::expected<user_provided_move, int> tm1(std::move(t1)); tl::expected<defaulted_move, int> tm2(std::move(t2)); // does not compile }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi.
Looks like if a type is not trivially move-constructible, then
tl::expected<T, ...>
is not move-constructible at all. Is this behavior intended?Here is an example tested with the current master branch and gcc 11.1
The text was updated successfully, but these errors were encountered: