Daily bit(e) of C++ | Overload selection: functions vs. function templates
Daily bit(e) of C++ #265, Function overload selection between functions and function templates.
The function overload selection rules are complex enough to justify a book. Very roughly:
construct the set of viable functions (following lookup rules and deducing arguments for function templates)
the best viable function minimizes implicit conversions first and then prefers concrete functions over templates
templates are ordered by how *concrete* they are