Sutter and Alexandrescu have discribed in a quite simple and self contained way the ecosystem of C++ classes, providing 6 main categories
- Value classes (e.g., std::pair, std::vector)
- Base classes (building blocks of class hierarchies)
- Traits classes (templates that carry information about types)
- Policy classes (fragments of pluggable behavior)
- Exception classes
- Ancillary classes that typically support specific idioms (e.g. RAII)
It is a very handy shortcut when taking decisions on class design and I' ve used it before, but there are two things that come into play: 2004 (the year that book was puplished) is a long time ago in software engineering and there is a new language standard since then. I can't but wonder:
- Is this this categorization still relevant?
- Are there any new items ammending the above list?
- Is there an alternative categorization, by authors having matching authoritative power?
- Is there a standard taxonomy for c++ classes? (for all I know this could also be it)
NOTE:
I hope the 4 questions above have a clear setting. To avoid opinion based answers, a valid answer should link/mention examples, code usage or standard excerpts that verify its statings.