[libcxx-commits] [PATCH] D97394: [libc++] [C++2b] [P2162] Allow inheritance from std::variant.
Marek Kurdej via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Feb 24 08:26:54 PST 2021
curdeius created this revision.
curdeius added a reviewer: ldionne.
Herald added a subscriber: arichardson.
curdeius requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.
This patch changes the variant even in pre-C++2b.
It should not break anything, only allow use cases that didn't work previously.
Previous standards didn't disallow this AFAIK.
But I'm OK to make this change C++2b-only.
That's pretty much a work in progress, but I'd like to have your input on the following:
- What else should be tested?
- Is there a way to avoid __as_variant? Should it be a goal?
- __as_variant is used in __visitation::__variant::__visit_alt, but I haven't used it in __visitation::__variant::__visit_alt_at. That's because it is used only in __visit_value_at, which in turn is always used on variant specializations (that's in comparison operators).
rG LLVM Github Monorepo
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 10752 bytes
Desc: not available
More information about the libcxx-commits