
10 Jan
2008
10 Jan
'08
9:57 p.m.
On Jan 10, 2008, at 4:54 PM, Gennadiy Rozental wrote:
Doug Gregor <dgregor <at> osl.iu.edu> writes:
Traits classes are far better than nested typedefs, because one can always specialize a traits class for an existing type---even if you can't modify the type because it is built-in or comes from another library that you can't modify.
This is not exactly true if typedefs are part of some concepts types used as a policies, right? This is true is we are talking about typedefs as members of your primary template parameter type.
With policies... sure, nested types are okay there, because you typically have to code each policy class for a specific template anyway (and there generally isn't reuse of policies across libraries). - Doug