-
Notifications
You must be signed in to change notification settings - Fork 90
Closed
Description
First of all, thank you for providing this implementation of std::variant
. It's great to have a lightweight alternative to boost::variant
available in C++11.
I just stumbled over an issue with recursive type definitions, and I'm not sure whether it's a limitation of C++11 or the variant implementation. The following struct definition compiles fine with GCC's and Clang's C++17 support:
struct S {
std::variant<
std::map<int, S>*
> var;
};
When replacing std::variant
with mpark::variant
, I get an error message regarding the incomplete type S
of std::pair<int, S>::second
. Is it possible to enhance your implementation so that this kind of recursive type definition compiles with mpark::variant
under C++11 as well?
Metadata
Metadata
Assignees
Labels
No labels