summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist2.C
blob: f34b9801607f3754d5787b40ee7d6fabe11d66a1 (plain)
1
2
3
4
5
6
7
8
9
10
// { dg-options -std=c++0x }

#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);