[libcxx-commits] [PATCH] D101661: [libc++] Fix template instantiation depth issues with std::tuple

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Apr 30 13:29:00 PDT 2021


ldionne created this revision.
ldionne requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

This fixes the issue by implementing _And using the short-circuiting
SFINAE trick that we previously used only in std::tuple. One thing we
could look into is use the naive recursive implementation for disjunctions
with a small number of arguments, and use that trick with larger numbers
of arguments. It might be the case that the constant overhead for setting
up the SFINAE trick makes it only worth doing for larger packs, but that's
left for further work.

This problem was raised in https://reviews.llvm.org/D96523.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D101661

Files:
  libcxx/include/__tuple
  libcxx/include/type_traits
  libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/recursion_depth.pass.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101661.342025.patch
Type: text/x-patch
Size: 6889 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210430/4d9d5698/attachment.bin>


More information about the libcxx-commits mailing list