Issue |
149443
|
Summary |
satisfaction of constraint 'move_constructible<_Tp>' depends on itself
|
Labels |
new issue
|
Assignees |
|
Reporter |
G-M-twostay
|
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?
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs