[libcxx-commits] [libcxx] [libc++][NFC] Replace tag dispatch with `if constexpr` in `<any>` and `<variant>` (PR #173538)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jan 5 08:47:04 PST 2026


================
@@ -918,17 +918,11 @@ protected:
     if (this->index() == _Ip) {
       __a.__value = std::forward<_Arg>(__arg);
     } else {
----------------
philnik777 wrote:

Can we make this an `else if constexpr` instead? (GH is being weird, so I can't make a suggestion diff)

https://github.com/llvm/llvm-project/pull/173538


More information about the libcxx-commits mailing list