// PR c++/79457 // { dg-do compile { target c++11 } } template class Foo { private: T& goo; template using S = decltype (goo[R ()]); public: Foo (T& goo) : goo {goo} {} template S boo () {} }; int main () { int bar[] = {1, 2, 3}; Foo foo {bar}; }