1 // PR c++/58612
2 // { dg-do compile { target c++11 } }
3 
4 struct A
5 {
fooA6   int foo() const { return 0; }
7 };
8 
9 template<typename> struct B
10 {
11   A a;
barB12   constexpr int bar() { return a.foo(); } // { dg-error "foo" "" { target { ! implicit_constexpr } } }
13 };
14 
15 constexpr int i = B<void>().bar(); // { dg-error "bar" "" { target { ! implicit_constexpr } } }
16