[libcxx-commits] [PATCH] D85420: [libcxx/variant] Introduce `switch`-based mechanism for `std::visit`.
Michael Park via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Aug 12 09:27:23 PDT 2020
mpark added inline comments.
================
Comment at: libcxx/test/std/utilities/variant/variant.visit/visit.pass.cpp:347
+ {
+ using V = std::variant<int, long, double, long long, MakeEmptyT>;
+ V v1(42l), v2(101), v3(202), v4(1.1);
----------------
ldionne wrote:
> Do we have tests with sufficiently large variants?
Yeah, I adjusted the # of switch cases from 1024 to 256 (see the adjusted numbers). This test needs 5^4 = 625 cases, so it uses the vtable approach.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85420/new/
https://reviews.llvm.org/D85420
More information about the libcxx-commits
mailing list