Ordirary function is called first.
The reason is because standard says:
F1 is preferred over F2 if
"
....
— F1 is a nontemplate
function and F2 is a template function specialization,
....
"
Take a look at ISO/IEC 14882.
13.3.3 Best Viable Function.
Or find it inside the 2003 standard.
da*******@gmail.com wrote:
can u let me know if two functions having same name foo(), one is
atemplate function and otherone being ordinary function. if i invoked
the function from main(), which function is to called & why.
thanks