2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / decltype43.C
blob7a1dcbf8744c120f2c303e9d072fe66ccc6eb1bc
1 // PR c++/53763
2 // { dg-do compile { target c++11 } }
4 template<typename TYPE>
5 struct A
7   static int a(TYPE value)
8   {
9     return value;
10   }
13 template<typename... ARGS>
14 struct B
16   static int b(ARGS...)
17   {
18     return 0;
19   }
22 int main()
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;