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: 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) :)

thanks

> 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
_Traits.

Since I'm the user in this case, I'm planning on donig the sane thing...

;)

-benjamin


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