1 // PR c++/80767 2 // { dg-options -std=c++17 } 3 4 template <typename... Fs> 5 struct overloader : Fs... 6 { 7 overloader(Fs... fs) 8 : Fs(fs)... 9 { } 10 11 using Fs::operator()...; 12 }; 13 fooa14struct a { void foo() { } }; barb15struct b { void bar() { } }; barc16struct c { void bar() { } }; 17 main()18int main() { 19 overloader{ 20 [](a x) { x.foo(); }, 21 [](auto x) { x.bar(); } 22 }(a{}); 23 } 24