blob: b75e97cb89d78bbf1265812967278754f4f33fa8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// P2036R3 - Change scope of lambda trailing-return-type
// PR c++/102610
// { dg-do compile { target c++23 } }
// { dg-options "" }
constexpr char f(auto a) { return 'a'; }
namespace A {
int i = 42;
template<char X = f([i]{})> void g() { } // { dg-warning "capture of variable .A::i. with non-automatic storage duration" }
}
namespace B {
void call() { A::g(); }
}
|