https://bugs.llvm.org/show_bug.cgi?id=51549
Bug ID: 51549
Summary: considering conversion functions in the context of
copy-initializing a type from the same type
Product: clang
Version: 11.0
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: C++
Assignee: unassignedclangb...@nondot.org
Reporter: barry.rev...@gmail.com
CC: blitzrak...@gmail.com, dgre...@apple.com,
erik.pilking...@gmail.com, llvm-bugs@lists.llvm.org,
richard-l...@metafoo.co.uk
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.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs