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
Add execution tests of ARM EXT intrinsics
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
constexpr-non-const-arg3.C
blob
d8603f838b54ba019d61820daa00c63da4b0886e
1
// PR c++/49988
2
// { dg-do run { target c++11 } }
3
4
template<int ... I> struct X { };
5
6
struct A {
7
char data[3];
8
template<int ... I>
9
constexpr
10
A(const char (&s)[3], X<I...> x) : data{ s[I]...} { }
11
};
12
struct B {
13
A a;
14
B(const char (&s)[3]) : a{s,X<0,1,2>{}} { }
15
};
16
17
int main()
18
{
19
B b{"12"};
20
if (b.a.data[0] != '1')
21
return 1;
22
}