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