http://llvm.org/bugs/show_bug.cgi?id=13539
Bug #: 13539
Summary: use of overloaded operator '+' is ambiguous if a
template conversion operator also exists
Product: clang
Version: trunk
Platform: PC
OS/Version: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: C++11
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
Both MSVC and gcc (4.5.0) handle the following code.
clang will give :
error: use of overloaded operator '+' is ambiguous
======
template <typename T>
struct C
{
operator T();
template <typename U> operator U();
};
void f(C<int> obj)
{
int x = obj + 1;
}
======
Is clang right or wrong?
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs