-
Notifications
You must be signed in to change notification settings - Fork 67
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
Regression after 1.62: variant<recursive_wrapper<X>, ...>
is not constructible from X
when X
is a variant
#100
Comments
Compile time error is actually a very good outcome!
In cases when Anyway, I find explicitness in those variant1<>variant2 conversions a very good feature. In your example, should the variant hold Fell free to reopen this ticket, if there are some real world examples where the old behavior really required. |
I think you are missing the other side here. Let's say
The thing is that the previously valid code is broken without any notice and it had not been documented to the present day.
I don't care that much of this issue, but it blocks migration from old boost versions when there is really no bugs in the user code, and no way to at least temporary turn this 'diagnostic' off. See https://stackoverflow.com/questions/73263043/updating-boostvariant-from-boost-1-60-to-boost-1-79 |
Yor're right, at least the docs should be changed |
Use an overload set to detect if a type can be used in a converting constructor or assignment, in a similar way as std::variant. Also fixes the "regression" mentioned in boostorg#100.
Regressed in 9272805
Removing these specializations fixes the compilation
variant/include/boost/variant/recursive_wrapper_fwd.hpp
Lines 60 to 67 in d2fdf23
The text was updated successfully, but these errors were encountered: