[libc++] [C++2b] [P2162] Allow inheritance from std::variant.
This patch changes the variant even in pre-C++2b.
It should not break anything, only allow use cases that didn't work previously.
Notes:
`__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).
* https://wg21.link/P2162
Reviewed By: ldionne, #libc, Quuxplusone
Differential Revision: https://reviews.llvm.org/D97394
GitOrigin-RevId: 0324b46cd873abc4fabe19f4bd468d10398ffd0d
diff --git a/docs/FeatureTestMacroTable.rst b/docs/FeatureTestMacroTable.rst
index 40a6bda..806b30f 100644
--- a/docs/FeatureTestMacroTable.rst
+++ b/docs/FeatureTestMacroTable.rst
@@ -162,7 +162,7 @@
------------------------------------------------- -----------------
``__cpp_lib_unordered_map_try_emplace`` ``201411L``
------------------------------------------------- -----------------
- ``__cpp_lib_variant`` ``201606L``
+ ``__cpp_lib_variant`` ``202102L``
------------------------------------------------- -----------------
``__cpp_lib_void_t`` ``201411L``
------------------------------------------------- -----------------