This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Docs for strings of arbitrary character types
- From: Jonathan Wakely <cow at compsoc dot man dot ac dot uk>
- To: Paolo Carlini <pcarlini at suse dot de>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Wed, 13 Jul 2005 14:17:26 +0100
- Subject: Re: Docs for strings of arbitrary character types
- References: <20050713124126.GB97361@compsoc.man.ac.uk> <42D51272.1090100@suse.de>
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