repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
PR tree-optimization/86415 - strlen() not folded for substrings within constant arrays
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp1z
/
lambda-inherit1.C
blob
75ef586b542e366c72c81fafe493b74ed7ef3d9c
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
14
struct a { void foo() { } };
15
struct b { void bar() { } };
16
struct c { void bar() { } };
17
18
int main() {
19
overloader{
20
[](a x) { x.foo(); },
21
[](auto x) { x.bar(); }
22
}(a{});
23
}