p22.cpp revision 762bb9d0ad20320b9f97a841dce57ba5e8e48b07
1// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s 2 3// If the original function parameter associated with A is a function 4// parameter pack and the function parameter associated with P is not 5// a function parameter pack, then template argument deduction fails. 6template<class ... Args> int& f(Args ... args); 7template<class T1, class ... Args> float& f(T1 a1, Args ... args); 8template<class T1, class T2> double& f(T1 a1, T2 a2); 9 10void test_f() { 11 int &ir1 = f(); 12 float &fr1 = f(1, 2, 3); 13 double &dr1 = f(1, 2); 14} 15