https://llvm.org/bugs/show_bug.cgi?id=25288
Bug ID: 25288 Summary: bug with variadic class friend functions Product: clang Version: trunk Hardware: PC OS: All Status: NEW Severity: normal Priority: P Component: C++14 Assignee: unassignedclangb...@nondot.org Reporter: ryan.b...@gmail.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified The below code compiles fine with gcc and EDG, but gives this error with clang: rnburn@localhost ~/test/friend_auto $ c++14 t.cpp t.cpp:18:3: error: call to 'f' is ambiguous f(a); ^ t.cpp:6:15: note: candidate function [with Qx = <int, double>] friend auto f(A<Qx...> a); ^ t.cpp:12:6: note: candidate function [with Qx = <int, double>] auto f(A<Qx...> a) { ^ 1 error generated. /////////////////////////////////////////////////////////////// template<class... Tx> class A { public: A(int xx) : x(xx) {} template<class... Qx> friend auto f(A<Qx...> a); private: int x; }; template<class... Qx> auto f(A<Qx...> a) { return a.x; } int main() { A<int, double> a(22); f(a); return 0; } /////////////////////////////////////////////////////////////// -- 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