gcc/testsuite/g++.dg/cpp0x/dependent3.C
raw| 1 | // { dg-do compile { target c++11 } } |
| 2 | |
| 3 | template<typename c> |
| 4 | struct d |
| 5 | { |
| 6 | using e = c; |
| 7 | }; |
| 8 | |
| 9 | template<class f> |
| 10 | struct g |
| 11 | { |
| 12 | using h = typename d<f>::e; |
| 13 | |
| 14 | template<class i, class j> |
| 15 | auto operator()(i, j k) -> decltype(h{k}); |
| 16 | }; |
| 17 | |
| 18 | template<class l> |
| 19 | void m() |
| 20 | { |
| 21 | int a[1]; |
| 22 | l{}(a, a); |
| 23 | } |
| 24 | |
| 25 | int main() |
| 26 | { |
| 27 | m<g<int *>>(); |
| 28 | } |