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-initlist2.C
blob
65a7036ef0f59a2c683889ae77b0b7f9e05cf5c9
1
// { dg-do compile { target c++11 } }
2
3
#include <initializer_list>
4
5
constexpr auto list = { 1, 2, 3, 4 };
6
7
#define SA(X) static_assert(X, #X)
8
SA(list.size() == 4);
9
SA(list.begin()[2] == 3);
10
SA(list.end()[-1] == 4);