This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Docs for strings of arbitrary character types


On Wed, Jul 13, 2005 at 03:09:06PM +0200, Paolo Carlini wrote:

> Jonathan Wakely wrote:
> 
> >Re http://gcc.gnu.org/onlinedocs/libstdc++/21_strings/howto.html#5
> >
> >Am I right in thinking that this information is out of date?
> >
> >IIUC GCC 3.4 restored a "mostly-correct implementation that let
> >programmers be lazy"
> >
> >If needed I'll add it to my docs TODO list and try to get round to
> >doing it this millenium.
> >  
> >
> :) Yes, seems a nice idea. However, we should really warn the "lazt
> programmers" about the limitation of that, see in particular, the second
> comment on top of char_traits.h.

This one?

   *  @note For any given actual character type, this definition is
   *  probably wrong.  (Most of the member functions are likely to be
   *  right, but the int_type and state_type typedefs, and the eof()
   *  member function, are likely to be wrong.)  The reason this class
   *  exists is so users can specialize it.  Classes in namespace std
   *  may not be specialized for fundamentl types, but classes in
   *  namespace __gnu_cxx may be.

I'm updating the HTML docs and will document the process of specializing
_Char_traits (and possibly __gnu_cxx::char_traits) to get it right.

jon


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]