summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/constexpr-string.C
blob: e76d00d7e63045346749775e2c0c7483260472a4 (plain)
1
2
3
4
5
// { dg-options -std=c++0x }

constexpr char c1 = "hi"[1];
constexpr char c2 = "hi"[2];
constexpr char c3 = "hi"[3];	// { dg-error "out of bound" }