Mail Archives: djgpp/2005/05/21/02:46:35
On 20 May 2005 14:11:40 -0700 in comp.os.msdos.djgpp, "Carey Evans"
<carey DOT evans AT gmail DOT com> wrote:
>Hans-Bernhard Broeker wrote:
>[...]
>> I find it hard to believe the C++ would actually predefine the
>> implemention of a given feature. That's none of their business.
How the expression looks says little about how it may be implemented
in C++.
>Here's the bit of the spec I quoted:
>
> http://www.cantrip.org/lib-locales.html#lib.facet.ctype.char.members
>
>As far as I can tell, it's defined that way so that the table may be
>customised in a subclass. There's nothing that says that the table()
>method has to return __dj_ctype_flags or the equivalent table by
>default, though; it just has to return some variation that works when
>the character is cast to unsigned char as an index. In DJGPP's case,
>this is __dj_ctype_flags + 1.
>
>[...]
>> Only if you misunderstand how that table is supposed to be
>> constructed, in the case of DJGPP. The C++ standard seems to have
>> forgotten about the C specialty of passing EOF into a <ctype.h>
>> library macro/function.
>
>The C++ ctype classes don't support passing EOF; valid input values are
>CHAR_MIN to CHAR_MAX, inclusive.
The table operator[] could be defined to check the values, then throw
an exception, or return the c + 1 entry from the real table.
--
Thanks. Take care, Brian Inglis Calgary, Alberta, Canada
Brian DOT Inglis AT CSi DOT com (Brian[dot]Inglis{at}SystematicSW[dot]ab[dot]ca)
fake address use address above to reply
- Raw text -