<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/81577>81577</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Unexpected behavior in deduction of nested templates with template template parameters (inconsistent with GCC, MSVC)
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
13steinj
</td>
</tr>
</table>
<pre>
I don't have enough practice with standard-ese to express myself any better than that, unfortunately. Define `EVEN_WORSE` or `ALTERNATIVE_EVEN_WORSE` for a different, but seemingly related, inconsistency. Define `FIXED` to fix the original issue, and "fix" the "even worse" inconsistencies (successful compile, unexpectedly).
I'm happy to provide the motivating example, it's just larger. A whole load of transitional layers from one set of types to another.
<details>
<summary><a href="https://gcc.godbolt.org/z/Whqfnjv49">Reduced Example</href></summary>
```cpp
template<typename>
struct Wrapper;
template<template<typename> typename, typename T>
using ComposedWrapper = Wrapper<T>;
template<typename...>
struct mp_list;
template<typename>
struct converter_impl;
template<typename T>
using converter = converter_impl<T>::type;
template<
#if !defined(EVEN_WORSE)
template<typename> typename Wrapper,
#endif
typename T
>
struct converter_impl<mp_list<Wrapper<T>>> {
using type = void;
};
template<typename T>
struct converter_impl<ComposedWrapper<Wrapper, T>> {
using type = converter<T>;
};
#if defined(__clang__) && defined(FIXED)
template<typename T>
struct converter_impl<ComposedWrapper<Wrapper, mp_list<T>>> {
using type = int;
};
#endif
template<typename>
concept valid = true;
static_assert(valid<converter<ComposedWrapper<Wrapper,
#if !defined(ALTERNATIVE_EVEN_WORSE)
mp_list<
#endif
mp_list<int>
#if !defined(ALTERNATIVE_EVEN_WORSE)
>
#endif
>>>);
```
</details>
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy0VlGP4jYQ_jXmZXQoTDgCDzxwAaqV2qt0t73rGzLxhHjl2Kk9YZf--soJCznudvdaqRIKju35Zr4ZTz7LE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