repo.or.cz
/
gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fortran: Fix PR 47485.
[gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
constexpr-array23.C
blob
1829fa7a6535422deeb4abd42f97433f740d03e2
1
// PR c++/86917
2
// { dg-do compile { target c++11 } }
3
4
struct A
5
{
6
constexpr A () : c (0) {}
7
static const A z;
8
unsigned c;
9
};
10
11
struct B
12
{
13
typedef A W[4]; // { dg-error "paren" "" { target { ! c++20 } } .+1 }
14
constexpr B () : w ({ A::z, A::z, A::z, A::z }) {} // { dg-error "constant|could not convert" }
15
W w;
16
};
17
18
struct C
19
{
20
C ();
21
B w[1];
22
};
23
24
C::C () { }