标准编号:ISO/IEC TR 19768:2007

中文名称:信息技术 程序设计语言 C++库扩展的技术报告

英文名称:Information technology — Programming languages — Technical Report on C++ Library Extensions

发布日期:2007-11

标准范围

1 This Technical Report describes extensions to the C++ standard library that is described in the InternationalStandard for the C++ programming language [14].2 This Technical Report is non-normative. Some of the library components in this Technical Report may be consideredfor standardization in a future version of C++, but they are not currently part of any C++ standard. Some of thecomponents in this Technical Report may never be standardized, and others may be standardized in a substantiallychanged form.3 The goal of this Technical Report is to build more widespread existing practice for an expanded C++ standardlibrary. It gives advice on extensions to those vendors who wish to provide them.1.1 Relation to C++ Standard Library Introduction [tr.description]1 Unless otherwise specified, the whole of the ISO C++ Standard Library introduction [lib.library] is included in thisTechnical Report by reference.1.2 Categories of extensions [tr.intro.ext]1 This Technical Report describes four general categories of library extensions:1. New requirement tables, such as the regular expression traits requirements in 7.2. These are not directlyexpressed as software; they specify the circumstances under which user-written components will interoperatewith the components described in this Technical Report.2. New library components (types and functions) that are declared in entirely new headers, such as the classtemplates in the header (6.3.4.1).3. New library components declared as additions to existing standard headers, such as the mathematical specialfunctions added to the headers and in 5.2.1 and 5.2.24. Additions to standard library components, such as the extensions to class std::pair in 6.1.4.2 New headers are distinguished from extensions to existing headers by the title of the synopsis clause. In the first case,the title is of the form “Header synopsis”, and the synopsis includes all namespace scope declarationscontained in the header. In the second case, the title is of the form “Additions to header synopsis” and thesynopsis includes only the extensions, i.e. those namespace scope declarations that are not present in the C++standard [14].1.3 Namespaces and headers [tr.intro.namespaces]1 Since the extensions described in this Technical Report are not part of the C++ standard library, they should not bedeclared directly within namespace std. Unless otherwise specifed, all components described in this Technical Reportare declared in namespace std::tr1. [Note: Some components are declared in subnamespaces of namespace std::tr1.—end note]2 Unless otherwise specified, references to other entities described in this Technical Report are assumed to be qualifiedwith std::tr1::, and references to entities described in the International Standard are assumed to be qualified withstd::.3 Even when an extension is specified as additions to standard headers (the third category in 1.2), vendors should notsimply add declarations to standard headers in a way that would be visible to users by default. [Note: That would failto be standard conforming, because the new names, even within a namespace, could conflict with user macros. —endnote] Users should be required to take explicit action to have access to library extensions.4 It is recommended either that additional declarations in standard headers be protected with a macro that is notdefined by default, or else that all extended headers, including both new headers and parallel versions of standardheaders with non-standard declarations, be placed in a separate directory that is not part of the default search path.

标准预览图

下载信息


立即下载标准文件

大家都在看