need help with std::char_traits<unsigned short> methods
Phil Edwards
phil@jaj.com
Sat Jul 5 04:36:00 GMT 2003
On Sat, Jul 05, 2003 at 01:44:57AM +0200, Gerry wrote:
>
> > You can specialize a template from std, if at least one of the types
> > involved in the specialization is user-defined, e.g.,
>
> So, if i got it right, that means i _can't_ specialize a template if the type
> is basic, like unsigned short, but have to create a class to wrap it in.
Yes, but the class has to also be a POD ("Plain Old Data"), which basically
means a C-style struct. (You can still call is "class", of course;
consult any good C++ text.) But no virtual stuff, etc.
Phil
--
If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace. We seek
not your counsel, nor your arms. Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen. - Samuel Adams
More information about the Libstdc++
mailing list