This is the mail archive of the
mailing list for the libstdc++ project.
Re: user-defined types and basic_string
> You'd need to get rid of the character ctors to make it conforming and
> portable (the type must be a POD), but other than that it looks pretty
> close to our charT that we test string and iostreams with (see below) :)
> You must have a lot of time on your hands ;-) Are you really willing
> to rewrite all facets as an exercise? I think the only feasible approach
> would be to either add a traits template parameter to them or diligently
> use char_traits<char_type> in all facets and hope that the user
> specializes it rather than creating their own (unrelated) class.
The second. As noted previously, unless there is an assumption about the
use of char_traits<> specializations, then there is ambiguity in things
like num_get, where you have _CharT, and _IterT, but no explicit
Since I'm the user in this case, I'm planning on donig the sane thing...