Consider the following declarations:
template<typename T1, typename T2> void g( T1, T2 ); // 1 template<typename T> void g( T ); // 2 template<typename T> void g( T, T ); // 3 template<typename T> void g( T* ); // 4 template<typename T> void g( T*, T ); // 5 template<typename T> void g( T, T* ); // 6 template<typename T> void g( int, T* ); // 7 template<> void g<int>( int ); // 8 void g( int, double ); // 9 void g( int ); // 10
Which of the above functions are invoked by each of the following? Identify the template parameter types, where appropriate.
int i; double d; float f; complex<double> c; g( i ); // a g<int>( i ); // b g( i, i ); // c g( c ); // d g( i, f ); // e g( i, d ); // f g( c, &c ); // g g( i, &d ); // h g( &d, d ); // i g( &d ); // j g( d, &i ); // k g( &i, &i ); // l