https://llvm.org/bugs/show_bug.cgi?id=31647
David Majnemer <david.majne...@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |david.majne...@gmail.com Resolution|--- |INVALID --- Comment #2 from David Majnemer <david.majne...@gmail.com> --- I can't reproduce with: clang version 5.0.0 (trunk 291737) (llvm/trunk 292034) $ cat t.cpp namespace { struct A { A(int) {} A(unsigned int) {} A(long long) {} A(unsigned long long) {} A(bool) {} A(float) {} A(double) {} }; long getLong() { return 42; } void f(const A &) {} } int main(int, char **) { long l = 42; f(l); return 0; } $ ~/llvm/Release+Asserts/bin/clang-cl t.cpp t.cpp(18,7) : error: conversion from 'long' to 'const (anonymous namespace)::A' is ambiguous f(l); AFAICT, your code is not supposed to compile. The fact that MSVC does is most likely indicative of a bug in that product. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs