summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/variadic-ttp4.C
blob: 72cff3874cb4e616da3921ddde35e2d5b67d5dc7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// { dg-do compile { target c++11 } }

template<typename _Tp>
struct get_first_arg;

template<template<typename, typename...> class _Template, typename _Tp,
	 typename... _Types>
struct get_first_arg<_Template<_Tp, _Types...>>
{ using type = _Tp; };

template<typename T> struct A { };

template<class,class> struct same;
template<class T> struct same<T,T> {};

same<get_first_arg<A<int>>::type,
     int> x;