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
PR c++/56973, DR 696 - capture constant variables only as needed.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp1y
/
nsdmi-aggr2.C
blob
83cb6c2439bdf2ea8237d393cb132dba1166b6aa
1
// { dg-do compile { target c++14 } }
2
3
struct S { int a; const char* b; int c; int d = b[a]; };
4
5
constexpr int f(const S& s) { return s.a; }
6
7
int main()
8
{
9
constexpr int i = f(S{ 1, "asdf" });
10
}