The declaration be :
Code:
template<class X,class Y> void foo(X,Y);
When calling it, which of the following it a good practice ?...
Code:
foo("bar",1); // no 1
foo<std::string,int>("bar",1);
Both seems to be working for me....and I've seen some books sticking for the former

...but the documentation(err..I've only looked into the one from cplusplus)...says(implicitly implies!!) that the implicit one works(or should work) for when X==Y
Since both i and j are of type int , and the compiler can automatically find out that the template parameter can only be int. This implicit method produces exactly the same result:
// *that follows after an example..so i,j,int are out of scope here..!