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
c++, coroutines: Simplify separation of the user function body and ramp.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp1y
/
constexpr-local4.C
blob
647b5dcd7cd5a8beaec5077ad2eba900238f8d8a
1
// { dg-do compile { target c++14 } }
2
3
struct A
4
{
5
int i;
6
constexpr A(int i): i(i) {};
7
};
8
9
const A a = 42;
10
11
constexpr int f()
12
{
13
const int j = a.i; // { dg-error "'a'" }
14
return j;
15
}
16
17
static_assert (f() == 42,""); // { dg-error "" }