Article View: comp.std.c++
Article #2912Re: Stuff C++ needs
From: Steve Clamage
Date: Fri, 08 Dec 1995 04:09
Date: Fri, 08 Dec 1995 04:09
31 lines
1584 bytes
1584 bytes
In article ghm@bcarh8ab.bnr.ca, "brian (b.c.) white" <bcwhite@bnr.ca> writes: > >I thought I read somewhere that C++ guarantees a "char" to be 8 bits (or >was that "one byte"?). In C and C++, the size of a char or a byte is always implementation-defined, and neither is required to be exactly 8 bits. A char or a byte could have more (or fewer) than 8 bits. Excerpts from the C++ draft standard: [intro.memory] 1.5 The C++ memory model The fundamental storage unit in the C++ memory model is the byte. A byte is at least large enough to contain any member of the basic execution character set and is composed of a contiguous sequence of bits, the number of which is implementationdefined. ... [basic.fundamental] 3.9.1 Fundamental types Objects declared as characters (char) shall be large enough to store any member of the implementation's basic character set. ... --- Steve Clamage, stephen.clamage@eng.sun.com --- [ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu. Contact address: std-c++-request@ncar.ucar.edu. The moderation policy is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Technical Details
Message-ID:
<4a7do9$itd@engnews1.eng.sun.com>Path:
arc1-ca.pugleaf.net!usenet.kornet.nm.kr!agate!agate!MattReferences:
<4a792a$ghm@bcarh8ab.bnr.ca>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!usenet.kornet.nm.kr!agate!agate!Matt From: clamage@Eng.Sun.COM (Steve Clamage) Newsgroups: comp.std.c++ Subject: Re: Stuff C++ needs Date: 08 Dec 1995 04:09:14 GMT Organization: Sun Microsystems Inc. Approved: Matt@Austern Message-ID: <4a7do9$itd@engnews1.eng.sun.com> References: <4a792a$ghm@bcarh8ab.bnr.ca> Reply-To: clamage@Eng.Sun.COM NNTP-Posting-Host: austern.hip.berkeley.edu