Hi! This PR got fixed in r244833, but as the testcase isn't a 7.x regression, but existed for years, I think it is worth to check in this testcase too. Tested on x86_64-linux, committed to trunk as obvious.
2017-02-10 Jakub Jelinek <ja...@redhat.com> PR c++/79457 * g++.dg/cpp0x/pr79457.C: New test. --- gcc/testsuite/g++.dg/cpp0x/pr79457.C.jj 2017-02-10 21:55:22.606388165 +0100 +++ gcc/testsuite/g++.dg/cpp0x/pr79457.C 2017-02-10 21:50:54.000000000 +0100 @@ -0,0 +1,24 @@ +// PR c++/79457 +// { dg-do compile { target c++11 } } + +template <typename T> +class Foo +{ +private: + T& goo; + template <typename R> + using S = decltype (goo[R ()]); + +public: + Foo (T& goo) : goo {goo} {} + + template <typename R> + S<R> boo () {} +}; + +int +main () +{ + int bar[] = {1, 2, 3}; + Foo<decltype (bar)> foo {bar}; +} Jakub