[all-commits] [llvm/llvm-project] c6eb58: [libc++] Fix recursive instantiation in std::array.

Eric via All-commits all-commits at lists.llvm.org
Thu Apr 9 14:42:35 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: c6eb584c64872fbb779df14acd31c1f3947f6e52
      https://github.com/llvm/llvm-project/commit/c6eb584c64872fbb779df14acd31c1f3947f6e52
  Author: Eric Fiselier <eric at efcs.ca>
  Date:   2020-04-09 (Thu, 09 Apr 2020)

  Changed paths:
    M libcxx/include/array

  Log Message:
  -----------
  [libc++] Fix recursive instantiation in std::array.

The use of the `&& ...` fold expression in std::array's deduction guides
recursively builds a set of binary operator expressions of depth N where
`N` is the number of elements in the initializer.

This is problematic because arrays may be large, and instantiation
depth is limited.

This patch addresses the issue by flattening the SFINAE using
the existing `__all` type trait.




More information about the All-commits mailing list