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
/
constexpr-lambda10.C
blob
d13053a9c4e2a4dd8e484163501605bdbe018b63
1
// Testcase from P0170R1
2
// { dg-do compile { target c++17 } }
3
4
void g() {
5
const int n = 0;
6
[=] {
7
constexpr int i = n; // OK, 'n' is not odr-used and not captured here.
8
constexpr int j = *&n; // { dg-error "" } '&n' would be an odr-use of 'n'.
9
};
10
}