[clang] [Clang][C++26] Implement P3865R1 - CTAD for type template template parameters (PR #191409)
Corentin Jabot via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 16 07:21:26 PDT 2026
cor3ntin wrote:
FYI this PR crashes on the following
```cpp
template <template <class Foo> class _Container, typename _Range>
struct _Deducer {
static auto __deduce_func() { return _Container{_Range{}}; }
using type = decltype(__deduce_func);
};
template <template <class> class _Container, typename _Range>
auto to(_Range) {
using _DeduceExpr = _Deducer<_Container, _Range>::type;
}
template <class> struct vector {};
void test() {
vector<int> range;
to<vector>(range);
}
```
And I haven't been able to figure out why.
I elected to declare the alias in the innermost non-function scope as we don't expect alias template in arbitrary contexts. However this can cause issues with template depth in a way that perplexes me...
https://github.com/llvm/llvm-project/pull/191409
More information about the cfe-commits
mailing list