[clang] [Clang] Copy initialization of an object of the same type should not consider user-defined conversions (PR #185936)
Brian Bi via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 11 19:29:34 PDT 2026
t3nsor wrote:
> However it led to recursive concept checking.
Note that you don't need recursive concept checking to see the bug. You could also use a concept that causes an error not in the immediate context when you check it. For example
```
template <class... T>
concept C = [] {
static_assert(sizeof...(T) > 1);
return true;
}();
struct Deferred {
friend void foo(Deferred) {}
template <C TO> operator TO();
};
void bar(Deferred d) {
foo(d);
}
```
https://github.com/llvm/llvm-project/pull/185936
More information about the cfe-commits
mailing list