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
2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp1z
/
class-deduction20.C
blob
4c009e70140b54bab9a21991bbee09c4e81ce49b
1
// PR c++/77890
2
// { dg-do compile { target c++17 } }
3
4
template<class F> struct S{S(F&&f){}};
5
void f()
6
{
7
S([]{});
8
}
9
10
template <typename TF>
11
struct scope_guard : TF
12
{
13
scope_guard(TF f) : TF{f} { }
14
~scope_guard() { (*this)(); }
15
};
16
17
void g()
18
{
19
struct K { void operator()() {} };
20
scope_guard _{K{}};
21
}