<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/149443>149443</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
satisfaction of constraint 'move_constructible<_Tp>' depends on itself
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
G-M-twostay
</td>
</tr>
</table>
<pre>
Using clang 20.1.0 with `-std=c++20`. I've boiled down the problem to the case below.
```
#include <type_traits>
#include <concepts>
struct A{
template <std::copyable T>
operator T()const noexcept{
return T{};
}
};
template<std::copyable T1,std::copyable T0>
T1 f(T0 v){
return v;
}
int main()
{
f<int>(A{});
}
```
entire stack trace appears quite long, but the problem started at
```
<source>:4:15: note: while checking the satisfaction of concept 'copyable<A>' requested here
4 | template <std::copyable T>
```
and turned into
```
.../concepts:275:24: error: satisfaction of constraint 'copy_constructible<_Tp>' depends on itself
275 | concept copyable = copy_constructible<_Tp> && movable<_Tp>
```
. Thus, changing `std::copyable` in line 4 to `typename` or `class` fixes the issue.
https://godbolt.org/z/5q3M3GvEY
GCC 14.3 and 15.1 compiles this just fine.
This issue looks similar to https://github.com/llvm/llvm-project/issues/134880 , but I'm not sure if they are the same issue, can any1 confirm?
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJykVc2OozgQfprKpdTI2AHCgQOdnoz2MLfsYU8jYyrB08ambZNM9ulXJkn3TE9rtKtFkYLLRX0_VQYZgj5aogaKRyieVnKOg_PN54cvD_HsQpSXVef6S_Nn0PaIykh7RM6yPGN41nFAKNlDiD2IJwX8EfgjZ1CyDP8AXp0IO6cN9di7s8U4EE7edYZGjG5ZKhkIOzLunAFroWS3H2uBC22VmXtCENt4mehr9FLHAOLTL9vKWUXTfS9EP6uILVSPwFpExEjjZGRccheyLYhWuekiO0O4vz6WEt1EXkbncQ98A7xWzoaI1tH3VP-tYLo8xdlb3Kdo9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