Common Error 22.1 (cont.)
- The < operator must be defined for T
- This won't work:
Employee mary("Mary Smith", 25000);
Employee fred("Fred Jones", 37500);
Employee big = max(mary, fred);
// Error - invalid types
- Compiler must see the entire definition of a function template
prev
|top
|next