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
/cp
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp1y
/
lambda-generic-69078-2.C
blob
318e0967250cfd867e0a02ec211bcdc0ac9b8a72
1
// PR c++/69078
2
// { dg-do run { target c++14 } }
3
4
#include <cassert>
5
6
template<typename F>
7
void run( F &&f ) {
8
f(nullptr);
9
}
10
11
struct V {
12
int i;
13
};
14
15
int main() {
16
static V const s={2};
17
assert (s.i == 2);
18
run([](auto){
19
assert (s.i == 2);
20
});
21
}