what is the difference between Template Explicit Specialization and ordinary function?

Posted by user323422 on Stack Overflow See other posts from Stack Overflow or by user323422
Published on 2010-04-28T10:22:36Z Indexed on 2010/04/28 10:43 UTC
Read the original article Hit count: 271

Filed under:
|
template <class T>
void max (T &a ,T &b)
{}//generic template   #1

template<> void max(char &c, char &d)
{} //template specializtion    #2

void max (char &c, char &d)
{}//ordinary function      #3

what is difference between 1 ,2, and 3?

© Stack Overflow or respective owner

Related posts about c++

Related posts about templates