|
Boost Users : |
From: Daryle Walker (darylew_at_[hidden])
Date: 2005-11-17 06:55:12
On 11/13/05 2:05 PM, "Robert Ramey" <ramey_at_[hidden]> wrote:
> Daryle Walker wrote:
>
>> 3a. In fact, I made a shocking realization researching for this
>> thread. The standard describes "bool" in section 3.9.1, paragraph 6.
>> Unlike "wchar_t" (described in paragraph 5), the "bool" does not have
>> to be a rip-off of another built-in integral type!
>
> I would be shocked to discover that wchar_t does have to be a rip-off
> of another built in integral type. The only compiler I test on that
> doesn't have wchar_t as an intrinsic type is VC 6.0. Should we
> be altering jam toolset to besure tha wchar_t is a synonnym for
> something else?
I do _not_ mean that "wchar_t" is a "typedef"! It is considered a separate
type. It is implemented like a "strong type-alias"[1] of another built-in
integral type, just like "char" is a strong type-alias of either "signed
char" and "unsigned char". The "bool" type could be of an underlying
built-in type that is otherwise unreachable in code, and that type doesn't
even have to be integral, just act that way through the compiler.
[1] C and C++ don't have this feature in general, although some wish for it.
Other languages do have this. I think Ada is an example.
-- Daryle Walker Mac, Internet, and Video Game Junkie darylew AT hotmail DOT com
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net