PR c++/58612
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / constexpr-neg3.C
blob55bb838a2bfb5033c5e21b0ebfa7cb8dea132c8a
1 // PR c++/58612
2 // { dg-do compile { target c++11 } }
4 struct A
6   int foo() const { return 0; }
7 };
9 template<typename> struct B
11   A a;
12   constexpr int bar() { return a.foo(); } // { dg-error "foo" }
15 constexpr int i = B<void>().bar(); // { dg-error "bar" }