summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/constexpr-sassert.C
blob: 3e08fb0efa3689c28d51c9babc248e6b20e9cf42 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// Allow static_assert in constexpr constructors, too.
// { dg-options -std=c++0x }

template<typename T>
struct A
{
  int i;

  constexpr A(int i) : i(i)
  {
    static_assert(sizeof(T) == 1, "");
  }
};