Large file iostreams
Martin Sebor
sebor@roguewave.com
Fri Sep 5 17:33:00 GMT 2003
Pétur Runólfsson wrote:
> Martin Sebor wrote:
...
>>I think the problem is that the whole locale
>>section is written in overly generic terms even though the only
>>types that most of the spec is entirely meaningful for are char,
>>wchar_t and mbstate_t.
>
>
> But the standard also specifies how used-defined specializations
> must behave, see 17.4.3.1. Still, it is often hard to see which
> parts of clause 22 are generic requirements, which parts are
> requirements for the "required instantiations" and which parts
> only apply to the "C" locale.
Exactly. Not only is it often hard to see, it isn't even always
clear whether the primary template is required to be defined or
just declared. For example, the ctype primary template is fully
specified yet it cannot be implemented for just any arbitrary
T. Is an implementation allowed to just declare it and define
the explicit specialization on wchar_t? This is detectable by
programs that attempt to derive from the primary template (to
reuse the public interface) and override the virtual functions
(to give them a meaningful definition).
Martin
More information about the Libstdc++
mailing list