blob: f89eb07b5a1a516f9d64a63a929ffd8bde1a08cb [file] [log] [blame]
// PR c++/80767
// { dg-do compile { target c++17 } }
template <typename... Fs>
struct overloader : Fs...
{
overloader(Fs... fs)
: Fs(fs)...
{ }
using Fs::operator()...;
};
struct a { void foo() { } };
struct b { void bar() { } };
struct c { void bar() { } };
int main() {
overloader{
[](a x) { x.foo(); },
[](auto x) { x.bar(); }
}(a{});
}