aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-nonlit.C
blob: 0534b41ad06be96e8d1cc9b8202329937ca34f90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// FIXME this is currently invalid, but seems like it should be OK
// { dg-do compile { target c++11 } }

struct A { A() { } };

template<class T>
constexpr bool ignore(T&&) { return true; }

static_assert(ignore(10), "Error"); // OK

A s;

static_assert(ignore(s), "Error"); // Currently an error