need help with std::char_traits<unsigned short> methods
Phil Edwards
phil@jaj.com
Fri Jul 4 21:30:00 GMT 2003
On Fri, Jul 04, 2003 at 06:33:36PM +0200, Gerry wrote:
> I've searched this list and looked around a bit, but i'm still uncertain about
> how to handle this. Is it okay to simply create the missing
> std::char_traits<unsigned short> functions in a header file ?
Start here: http://gcc.gnu.org/onlinedocs/libstdc++/21_strings/howto.html#5
> I seem to
> remember that overloading std is undefined.. What other options are there ?
You can't overload a namespace.
You can specialize a template from std, if at least one of the types
involved in the specialization is user-defined, e.g.,
namespace std
{
template<>
inline void
swap<MyFunkyType>(MyFunkyType& a, MyFunkyType& b)
{
......
}
}
--
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