Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/constexpr-sassert.C

raw
1 // Allow static_assert in constexpr constructors, too.
2 // { dg-do compile { target c++11 } }
3
4 template<typename T>
5 struct A
6 {
7 int i;
8
9 constexpr A(int i) : i(i)
10 {
11 static_assert(sizeof(T) == 1, "");
12 }
13 };