aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/decltype55.C
blob: 95427fc0018e6677a5e32a23d65b6fd3a5effda2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// PR c++/53211
// { dg-do compile { target c++11 } }

template<typename A, typename B>
  struct is_same { static const bool value = false; };

template<typename A>
  struct is_same<A, A> { static const bool value = true; };

template<typename... Args>
void func(Args... args)
{
  int arr[] = { args... };
  static_assert (is_same<decltype(arr), int[sizeof...(Args)]>::value, "");
}

int main()
{
  func(1, 2, 3, 4);
}