1 // PR c++/61433 2 // { dg-do compile { target c++11 } } 3 // { dg-options "-O -fcompare-debug -fno-inline -fno-ipa-pure-const -fipa-sra" } 4 // { dg-additional-options "-Wno-return-type" } 5 6 template <class T> 7 struct A 8 { 9 template <class V> 10 struct B 11 { 12 int MEM; 13 }; 14 }; 15 struct D {}; 16 struct C: public A<int>::B<D> 17 {}; 18 template <class T, class U, class V> 19 auto k(T t, U u, V v) -> decltype (t.U::template B<V>::MEM) 20 {} main()21int main() 22 { 23 k( C(), A<int>(), D() ); 24 return 0; 25 } 26