Closed
Description
Bugzilla Link | 51549 |
Version | 11.0 |
OS | Windows NT |
Reporter | LLVM Bugzilla Contributor |
CC | @DougGregor,@saxbophone,@zygoloid |
Extended Description
Reduced from StackOverflow (https://stackoverflow.com/q/68853472/2069064):
template <typename T>
concept Numeric =
requires(T a) {
foo(a);
};
struct Deferred {
friend void foo(Deferred);
template <Numeric TO> operator TO();
};
static_assert(Numeric<Deferred>);
clang is trying to check to see if a.operator Derived()
is a valid expression as part of checking if foo(a)
is valid. But we shouldn't be going that route here at all, copy-initializing a Derived
from an lvalue of type Derived
should only check constructors, not conversion functions.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done