f(1, 2, 3); # 2?
( , !), . -, . # 3 , # 1 # 2 :
template<class... Args>
void f(Args... args);
template<class T1, class... Args>
void f(T1 a1, Args... args);
int , . , :
, F1 , F2, i ICS i (F1) , ICS i (F2),
- [...]
- F1 F2 - , F1 - F2 , 14.5.6.2.
:
1: [temp.func.order]:
, , - ( (14.5.3)) , .
, :
void f(Pack1... args);
void f(U2 a1, Pack2... args);
2: , [temp.deduct.partial]. , , , , .
# 2 # 1. (T1, Args...) (Pack1...). P = T1, A = Pack1.... :
A , P , .
# 2 # 1 , Args... , , , T1, Args....
# 1 # 2. (Args...) (U2, Pack2...). , T1, Args... , Args....
# 2 , # 1 # 1, , , # 2, , # 2 :
F , G, , , F , G. F G, F G G , , , F.
, # 2.