aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist2.C
blob: 65a7036ef0f59a2c683889ae77b0b7f9e05cf5c9 (plain)
1
2
3
4
5
6
7
8
9
10
// { dg-do compile { target c++11 } }

#include <initializer_list>

constexpr auto list = { 1, 2, 3, 4 };

#define SA(X) static_assert(X, #X)
SA(list.size() == 4);
SA(list.begin()[2] == 3);
SA(list.end()[-1] == 4);