Integer representation (Was: Maximum size that an array can hold in C++)

Integer representation (Was: Maximum size that an array can hold in C++)

Post by Bo Persso » Sat, 13 Jun 2009 01:40:55



I find it in [basic.fundamental], 3.9.1/7:

"Types bool, char, wchar_t, and the signed and unsigned integer types
are collectively called integral
types. A synonym for integral type is integer type. The
representations of integral types shall define values
by use of a pure binary numeration system. [Example: this
International Standard permits 2's complement,
1's complement and signed magnitude representations for integral
types. ]"

which I guess is what James was referring to.


Bo Persson




--
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@netlab.cs.rpi.edu]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.yqcomputer.com/ ]
 
 
 

Integer representation (Was: Maximum size that an array can hold in C++)

Post by Bart van I » Sat, 13 Jun 2009 20:06:20


Thanks. For some reason, my mind kept skipping over that sentence every
time I looked at my (dead tree) copy of the standard.
>> >> Hah, I'm much better at searching than you!

I am not going to comment on that ;-)
>> >> Yay! :-) >> >> >>> I am not contesting the knowledge that integers must have a pure >>> binary representation, but I am troubled by the fact that I am unable >>> to locate this requirement in the standard. >>> >>> Perhaps the folks in comp.std.c++ can help [me] in locating the >>> clause that I keep missing. >> >> Posting there you'd just have me answering your question again. >> >> It would be rather silly to trust me more, or less, depending on the >> forum, or depending on which hat I'm wearing at the moment.

As I did not send a separate message to c.s.c++, but rather cross-posted
my previous message, you already answered in both groups.
And it is not that my trust level depends on the group, but rather to
give more people a chance to show they are better at searching than I
am. :-)
>> >> >> Cheers & hth., >> >> - Alf >>
Bart v Ingen Schenau
--
a.c.l.l.c-c++ FAQ: http://www.yqcomputer.com/
c.l.c FAQ: http://www.yqcomputer.com/
c.l.c++ FAQ: http://www.yqcomputer.com/ ++-faq-lite/


[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@netlab.cs.rpi.edu]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.yqcomputer.com/ ]