Message ID | 20170210210015.GW1849@tucnak |
---|---|
State | New |
Headers | show |
--- 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}; +}