aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/sfinae16.C
blob: 56cbdadc585037db79178eb24f823b84dd424765 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// PR c++/48531
// { dg-do compile { target c++11 } }

template<class T,
  class = decltype(T())
>
char f(int);

template<class>
double f(...);

struct B2 {
  B2(...);
};

#define SA(X) static_assert ((X), #X)
SA(sizeof(f<B2[2]>(0)) != 1);