In some compilers, they don’t need to be defined. But only one of them can be declared. You won’t pass compilation if you declare both int max(int, int); and char max(char, char); The compiler tries to match explicitly declared functions first, then try the template. If No match can be found, return +.
This post has been archived. It cannot be replied.