aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/sfinae38.C
blob: 2e860ee69998283b67d7cd70b787fbad67f78cf0 (plain)
1
2
3
4
5
6
7
8
9
10
// { dg-do compile { target c++11 } }

template<class T, unsigned = sizeof(T)>
auto f(int) -> char;

template<class>
auto f(...) -> char(&)[2];

static_assert(sizeof(f<void>(0)) != 1, "");
static_assert(sizeof(f<void()>(0)) != 1, "");