Стандарт C++ 98 (1119566), страница 86
Текст из файла (страница 86)
The initial elementsof the array have defined contents up to and including an element determined by some predicate. A character sequence can be designated by a pointer value S that designates its first element.2A null-terminated wide-character string, or NTWCS, is a wide-character sequence whose highest-addressedelement with defined content has the value zero.156)3The length of an NTWCS is the number of elements that precede the terminating null wide character.
Anempty NTWCS has a length of zero.4The value of ancharacter.5A static NTWCS is an NTWCS with static storage duration.157)NTWCSis the sequence of values of the elements up to and including the terminating null17.3.2.2 Functions within classes[lib.functions.within.classes]1For the sake of exposition, clauses 18 through 27 do not describe copy constructors, assignment operators,or (non-virtual) destructors with the same apparent semantics as those that can be generated by default(12.1, 12.4, 12.8).2It is unspecified whether the implementation provides explicit definitions for such member function signatures, or for virtual destructors that can be generated by default.17.3.2.3 Private members[lib.objects.within.classes]1Clauses 18 through 27 do not specify the representation of classes, and intentionally omit specification ofclass members (9.2).
An implementation may define static or non-static class members, or both, as neededto implement the semantics of the member functions specified in clauses 18 through 27.2Objects of certain classes are sometimes required by the external specifications of their classes to store data,apparently in member objects. For the sake of exposition, some subclauses provide representative declarations, and semantic requirements, for private member objects of classes that meet the external specificationsof the classes. The declarations for such member objects and the definitions of related member types areenclosed in a comment that ends with exposition only, as in://3streambuf* sb;Any alternate implementation that provides equivalent external behavior is equally acceptable.17.4 Library-wide requirements1exposition only[lib.requirements]This subclause specifies requirements that apply to the entire C++ Standard library.
Clauses 18 through 27specify the requirements of individual entities within the library.__________________155) An NTBS that contains characters only from the basic execution character set is also an NTMBS. Each multibyte character then consists of a single byte.156) Many of the objects manipulated by function signatures declared in <cwchar> are wide-character sequences or NTWCSs.157) A wide string literal, such as L"abc", is a static NTWCS.318© ISO/IECISO/IEC 14882:1998(E)17 Library introduction217.4 Library-wide requirementsThe following subclauses describe the library’s contents and organization (17.4.1), how well-formed C++programs gain access to library entities (17.4.2), constraints on such programs (17.4.3), and constraints onconforming implementations (17.4.4).17.4.1 Library contents and organization1[lib.organization]This subclause provides a summary of the entities defined in the C++ Standard Library. Subclause 17.4.1.1provides an alphabetical listing of entities by type, while subclause 17.4.1.2 provides an alphabetical listingof library headers.17.4.1.1 Library contents[lib.contents]1The C++ Standard Library provides definitions for the following types of entities: Macros, Values, Types,Templates, Classes, Functions, Objects.2All library entities except macros, operator new and operator delete are defined within thenamespace std or namespaces nested within namespace std.17.4.1.2 Headers[lib.headers]158)1The elements of the C++ Standard Library are declared or defined (as appropriate) in a header.2The C++ Standard Library provides 32 C++ headers, as shown in Table 11:Table 11—C++ Library Headers________________________________________________________________________ <algorithm><iomanip><list><ostream><streambuf> <bitset><ios><locale><queue><string><iosfwd><map><set><typeinfo> <complex><iostream><memory><sstream><utility> <deque><istream><new><stack><valarray> <exception> <fstream><iterator><numeric><stdexcept><vector> <functional><limits>________________________________________________________________________3The facilities of the Standard C Library are provided in 18 additional headers, as shown in Table 12:Table 12—C++ Headers for C Library Facilities_______________________________________________________ <cassert> <ciso646> <csetjmp> <cstdio> <ctime> <cctype> <climits> <csignal> <cstdlib> <cwchar> <cerrno> <clocale> <cstdarg> <cstring> <cwctype> <cfloat> <cmath><cstddef>_______________________________________________________4Except as noted in clauses 18 through 27, the contents of each header cname shall be the same as that of thecorresponding header name.h, as specified in ISO/IEC 9899:1990 Programming Languages C (Clause 7),or ISO/IEC:1990 Programming Languages—C AMENDMENT 1: C Integrity, (Clause 7), as appropriate,as if by inclusion.
In the C++ Standard Library, however, the declarations and definitions (except fornames which are defined as macros in C) are within namespace scope (3.3.5) of the namespace std.5Names which are defined as macros in C shall be defined as macros in the C++ Standard Library, even if Cgrants license for implementation as functions. [Note: the names defined as macros in C include the following: assert, errno, offsetof, setjmp, va_arg, va_end, and va_start. —end note]__________________158) A header is not necessarily a source file, nor are the sequences delimited by < and > in header names necessarily valid source filenames (16.2).319ISO/IEC 14882:1998(E)17.4.1.2 Headers© ISO/IEC17 Library introduction6Names that are defined as functions in C shall be defined as functions in the C++ Standard Library.159)7D.5, Standard C library headers, describes the effects of using the name.h (C header) form in a C++ program.160)17.4.1.3 Freestanding implementations[lib.compliance]1Two kinds of implementations are defined: hosted and freestanding (1.4).
For a hosted implementation,this International Standard describes the set of available headers.2A freestanding implementation has an implementation-defined set of headers. This set shall include at leastthe following headers, as shown in Table 13:Table 13—C++ Headers for Freestanding Implementations_________________________________________________________________________________________________SubclauseHeader(s)_______________________________________________18.1 Types<cstddef>________________________________________________________________________________________________18.2 Implementation properties<limits> 18.3 Start and termination<cstdlib>________________________________________________18.4 Dynamic memory management <new>________________________________________________________________________________________________18.5 Type identification<typeinfo> 18.6 Exception handling<exception> ________________________________________________18.7 Other runtime support<cstdarg>________________________________________________3The supplied version of the header <cstdlib> shall declare at least the functions abort(),atexit(), and exit() (18.3).17.4.2 Using the library1[lib.using]This subclause describes how a C++ program gains access to the facilities of the C++ Standard Library.17.4.2.1 describes effects during translation phase 4, while 17.4.2.2 describes effects during phase 8 (2.1).17.4.2.1 Headers[lib.using.headers]1The entities in the C++ Standard Library are defined in headers, whose contents are made available to atranslation unit when it contains the appropriate #include preprocessing directive (16.2).2A translation unit may include library headers in any order (clause 2).