<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/123414>123414</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Aliases and uniqueness of lambda in default argument of a class template parameter
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang:frontend,
            diverges-from:gcc,
            diverges-from:msvc,
            diverges-from:edg
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          cor3ntin
      </td>
    </tr>
</table>

<pre>
    Consider 

```cpp
template<typename T, typename F = decltype([](){} )>
struct Type {};

template<typename A>
using C = Type<A>;

static_assert(std::same_as<Type<int>,Type<int>>); // #1
static_assert(std::same_as<C<int>,C<int>>); // #2
```

https://godbolt.org/z/6ofdP1bPz

All compilers reject #1. Only clang reject #2.
This seems vaguely related, but distinct from 
https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#2794

Given https://eel.is/c++draft/temp.alias#2
> When a template-id refers to the specialization of an alias template, it is equivalent to the associated type obtained by substitution of its template-arguments for the template-parameters in the defining-type-id of the alias template.

And https://eel.is/c++draft/temp#arg.general-9.sentence-1
> When a simple-template-id does not name a function, a default template-argument is implicitly instantiated when the value of that default argument is needed.

It's clear as mud (to me) what the expected behavior should be. I'll contact CWG
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyUVE-P27gP_TTKhYhhy0k8PviQZJqip18PBXosZIl2VMiSK9LJL_PpF7Iz_zrbxS5gwJIoPj4-klJEtveIjdgexPZxpSY-h9joEEvP1q_aYG7NMXiyBiOIfJ--Xb58ehxFvmccRqcYRXnk24heDQjfhDzCy-4EonwEg9qlIyEflmBpIWtRHUT1CGlVfhL5njhOmuHbbURYbKI8LIH_LtJ-8ZrI-h6Oc6DkKsrjbHl2JVZs9Q9FhJGFfCA2otyLck9qwB-KRHm8u1nPyVH-tk9HtSgPIORJyBMIWRb_Dv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