summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/decltype16.C
blob: 2002458b8515f94116dd2ca7d1f8d7c86c944ab7 (plain)
1
2
3
4
5
6
7
8
9
10
// PR c++/39070
// { dg-options "-std=c++0x" }

template<typename X> struct junk {
   template<typename Z> static Z y();
   template<typename Y> static int  test(...);
   template<typename Y> static char test(decltype(y<Y>())*);
   static int const value=sizeof(test<X>(0));
};
typedef char type[junk<int>::value==sizeof(char) ? 1 : -1];