[libcxx-commits] [libcxx] [libc++] Reduce std::conjunction overhead (PR #124259)

via libcxx-commits libcxx-commits at lists.llvm.org
Wed Feb 5 06:23:57 PST 2025


eaeltsin wrote:

We might have overreduced the test, but ended up with the following code that makes the compiler exhaust the stack and SIGSEGV:
```
template <int> struct _AndImpl {
  template <class _First, class... _Rest>
  using _Result = _AndImpl<sizeof...(_Rest)>::template _Result<_First>;
};

template <class... _Args>
using _And = _AndImpl<sizeof...(_Args)>::template _Result<int>;

_And<>;
```

not yet sure which usage of `std::conjunction` leads to this.


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


More information about the libcxx-commits mailing list