summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/constexpr-nonlit.C
blob: 9104c8afac6414248acfefa6287c46430134f968 (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-options -std=c++0x }

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