http://llvm.org/bugs/show_bug.cgi?id=7095
Summary: Error: Ambiguous user-defined conversion sequence
Product: clang
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
terfin:clang dgregor$ cat t3.cpp
struct X { };
struct Y {
operator const X*();
operator X*();
};
void f(const X *);
void g(Y y) { f(y); }
terfin:clang dgregor$ clang++ t3.cpp
t3.cpp:9:17: error: conversion from 'Y' to 'X const *' is ambiguous
void g(Y y) { f(y); }
^
t3.cpp:4:3: note: candidate function
operator const X*();
^
t3.cpp:5:3: note: candidate function
operator X*();
^
t3.cpp:8:17: note: passing argument to parameter here
void f(const X *);
^
1 error generated.
terfin:clang dgregor$ g++ -fsyntax-only t3.cpp
terfin:clang dgregor$ eccp t3.cpp
terfin:clang dgregor
Revert commit r103312 when this is fixed.
--
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