https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58820
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Blocks|54367 | Status|NEW |RESOLVED --- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Unrelated to lambdas really. Here is a C++98 code which shows the same issue with clang: template<class t> struct i { t operator()(t i); }; struct overload_set1 : i<int>, i<double> { overload_set1() {} }; int main(void) { double d1 = 10; overload_set1 tt; tt(d1); } To make the original code work (you need C++17 really): Adding using Fs::operator()...; allows GCC (and ICC) to work. So this is a bug in clang. I don't think we need a testcase as we must likely already have a C++98 one even. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54367 [Bug 54367] [meta-bug] lambda expressions