[all-commits] [llvm/llvm-project] 0324b4: [libc++] [C++2b] [P2162] Allow inheritance from st...

Marek Kurdej via All-commits all-commits at lists.llvm.org
Thu Mar 25 10:21:14 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0324b46cd873abc4fabe19f4bd468d10398ffd0d
      https://github.com/llvm/llvm-project/commit/0324b46cd873abc4fabe19f4bd468d10398ffd0d
  Author: Marek Kurdej <marek.kurdej+llvm.org at gmail.com>
  Date:   2021-03-25 (Thu, 25 Mar 2021)

  Changed paths:
    M libcxx/docs/Cxx2bStatusPaperStatus.csv
    M libcxx/docs/FeatureTestMacroTable.rst
    M libcxx/include/variant
    M libcxx/include/version
    M libcxx/test/std/language.support/support.limits/support.limits.general/variant.version.pass.cpp
    M libcxx/test/std/language.support/support.limits/support.limits.general/version.version.pass.cpp
    M libcxx/test/std/utilities/variant/variant.visit/visit.pass.cpp
    M libcxx/test/std/utilities/variant/variant.visit/visit_return_type.pass.cpp
    M libcxx/utils/generate_feature_test_macro_components.py

  Log Message:
  -----------
  [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




More information about the All-commits mailing list