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
/
constexpr-local3.C
blob
76d4b55c416c126afc908e7d5c2230c05f814338
1
// PR c++/64647
2
// { dg-do compile { target c++14 } }
3
4
template<typename T>
5
constexpr T foo(T t)
6
{
7
T tt = t;
8
return tt;
9
}
10
11
struct X
12
{
13
X() { }
14
};
15
16
int main()
17
{
18
X x;
19
foo(x);
20
}