http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58820
--- Comment #1 from Daniel Krügler <daniel.kruegler at googlemail dot com> ---
This looks like a more fundamental name lookup problem of gcc to me. It can be
reproduced with function object types that are no lambda closures:
template <class... Fs>
struct overload_set : Fs...
{
overload_set(Fs... f)
: Fs(f)...
{}
};
template <class... Fs>
overload_set<Fs...> overload(Fs... x)
{
return overload_set<Fs...>(x...);
}
template<class T>
struct Closure
{
void operator()(T) const {}
using FPtr = void(*)(T);
operator FPtr() const;
};
int main()
{
double d = 10;
overload(
Closure<int>(),
Closure<double>(),
Closure<char>()
)(d);
}