Regression after 1.62: `variant<recursive_wrapper<X>, ...>` is not constructible from `X` when `X` is a variant
- Dominant language
- C++
- Stars
- 47
- Forks
- 71
- PR merge metrics
- No merged PRs in 30d
Description
Regressed in https://github.com/boostorg/variant/commit/927280570a553b43846e74ddd6b3802d5a1a5f1c
```cpp
#include
struct Nil {};
typedef boost::variant<
Nil
, double
>
Atom;
typedef boost::variant<
Nil
#if 1
, boost::recursive_wrapper
#else
, Atom
#endif
>
Base;
int main()
{
Atom atom;
Base base = atom;
}
```
Removing these specializations fixes the compilation https://github.com/boostorg/variant/blob/d2fdf2384b146b0c764077f5539f5f6ed7c40f20/include/boost/variant/recursive_wrapper_fwd.hpp#L60-L67
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.