[all-commits] [llvm/llvm-project] 84f0bb: [libc++] Fix template instantiation depth issues w...

Louis Dionne via All-commits all-commits at lists.llvm.org
Mon May 3 11:42:27 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 84f0bb619507caf7c4809400138dae1da578282a
      https://github.com/llvm/llvm-project/commit/84f0bb619507caf7c4809400138dae1da578282a
  Author: Louis Dionne <ldionne.2 at gmail.com>
  Date:   2021-05-03 (Mon, 03 May 2021)

  Changed paths:
    M libcxx/include/type_traits
    A libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/recursion_depth.pass.cpp

  Log Message:
  -----------
  [libc++] Fix template instantiation depth issues with std::tuple

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.

Differential Revision: https://reviews.llvm.org/D101661




More information about the All-commits mailing list