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: codecvt as an abstract base class


On Sep 28, 2010, at 6:43 PM, Paolo Carlini wrote:

> Hi,
>> By the way, what was the rationale for specifying std::codecvt not to declare its virtual members pure virtual, and not specifying any implementation either?
>> 
>> Is the intent that they be left dangling to produce link errors, or that dummy implementations (for example, throw an exception in every case) should be added? (What does everyone think of the latter option? Paolo?)
>> 
> frankly, at the moment I'm in the middle of way too many things to give
> a sensible contribution to this specific discussion. I'm sorry.

Yes, I felt bad just asking you for a comment, as that's apparent.

> To keep the focus on concrete issues, I would suggest also considering
> 
>    http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16006
> 
> when returning to codecvt (see in particular Comment 6), it's something
> people would really like to see us delivering.

I thought I already saw that implemented… yes, it's in include/ext/codecvt_specializations.h.

That code solves the problem using std::__codecvt_abstract_base, as does pod_uchar. Right now I'm writing a library for putting the state behind pimpl and shared_ptr, but as the library isn't part of GCC, I don't want to use that.


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