1// PR c++/14369 2 3struct A { }; 4 5template<class T> 6struct X : A { 7 const A* bar() const 8 { return this; } 9 10 const A& foo() const; 11}; 12 13template<class T> 14const A& X<T>::foo() const 15{ 16 const A* t = bar(); 17 return *(t ? t : throw 0); 18} 19 20 21