samedi 27 avril 2019

Why the third function call of f is not calling template function?

include

using namespace std;

template void f(T x, T y) { cout << "Template" << endl; }

void f(int w, int z) { cout << "Non-template" << endl; }

int main() { f( 1 , 2 ); f('a', 'b');enter code here f( 1 , 'b'); }

Aucun commentaire:

Enregistrer un commentaire