summaryrefslogtreecommitdiffstats
path: root/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.type/p22.cpp
blob: fcc6cf7ec732031e353d4c2a1346c0a8311642b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s

// If the original function parameter associated with A is a function
// parameter pack and the function parameter associated with P is not
// a function parameter pack, then template argument deduction fails.
template<class ... Args> int& f(Args ... args); 
template<class T1, class ... Args> float& f(T1 a1, Args ... args); 
template<class T1, class T2> double& f(T1 a1, T2 a2);

void test_f() {
  int &ir1 = f();
  float &fr1 = f(1, 2, 3);
  double &dr1 = f(1, 2);
}