[libcxx-commits] [PATCH] D97394: [libc++] [C++2b] [P2162] Allow inheritance from std::variant.

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Mar 4 15:36:09 PST 2021

ldionne added inline comments.

Comment at: libcxx/utils/generate_feature_test_macro_components.py:631
     "name": "__cpp_lib_variant",
-    "values": { "c++17": 201606 },
+    "values": { "c++17": 201606, "c++2b": 202102 },
     "headers": ["variant"],
curdeius wrote:
> curdeius wrote:
> > Quuxplusone wrote:
> > > Since you're making the change in all language versions (IIUC), shouldn't the feature-test macro have the higher value in all language versions? (Has this situation ever come up in WG21 before? what did the Committee think vendors should do?)
> > Ha, good catch. No idea what should be done, probably always setting to the higher value is OK.
> @ldionne, what's your opinion on this?
Yes, I think we need to always use the higher value. Otherwise, we're pretending that we implement a slightly different version of `std::variant` than we really are.

  rG LLVM Github Monorepo



More information about the libcxx-commits mailing list