gcc/testsuite/g++.dg/cpp0x/decltype43.C
raw| 1 | // PR c++/53763 |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | |
| 4 | template<typename TYPE> |
| 5 | struct A |
| 6 | { |
| 7 | static int a(TYPE value) |
| 8 | { |
| 9 | return value; |
| 10 | } |
| 11 | }; |
| 12 | |
| 13 | template<typename... ARGS> |
| 14 | struct B |
| 15 | { |
| 16 | static int b(ARGS...) |
| 17 | { |
| 18 | return 0; |
| 19 | } |
| 20 | }; |
| 21 | |
| 22 | int main() |
| 23 | { |
| 24 | int x = B<decltype(A<int>::a(1))>::b(A<int>::a(1)); |
| 25 | int y = B<decltype(A ::a(2))>::b(A<int>::a(2)); // { dg-error "template" } |
| 26 | return x + y; |
| 27 | } |