blob: 4b0d68bf6613c577842e66df38147f35e6c91274 [file] [log] [blame]
// { dg-do compile { target c++11 } }
template <class T> struct A
{
constexpr T f ();
};
int g();
// We should complain about this.
template<> constexpr int A<int>::f()
{ return g(); } // { dg-error "non-.constexpr." }
// But not about this.
struct B
{
int i;
constexpr B(int i = g()):i(i) { }
};
struct C: B { };
C c;