// Contributed by Dodji Seketeli // Origin PR c++/42225 // { dg-options "-std=c++0x" } // { dg-do compile } template struct A { typedef T I; static const char *i; }; template struct B { typedef T TT; typedef decltype(TT::i) TT_I0; typedef decltype(&TT::i) TT_I1; typedef decltype(*TT::i) TT_I2; typedef A TA0; typedef A TA1; typedef A TA2; }; template void foo() { typedef T TT; typedef decltype(TT::i) TT_I0; typedef decltype(&TT::i) TT_I1; typedef decltype(*TT::i) TT_I2; typedef A TA0; typedef A TA1; typedef A TA2; } int main() { foo >(); }