|
Technical Report 1 (TR1) is a draft document specifying additions to the C++ Standard Library such as regular expressions, smart pointers, hash tables, and random number generators. TR1 is not yet standardized, but likely will be part of the next official standard mostly as it stands now. In the meantime, vendors can use this document as a guide to create extensions. The report's goal is "to build more widespread existing practice for an expanded C++ standard library."* Overview Compilers need not include the TR1 components to be conforming, as TR1 is not yet officially part of the standard. Much of it is available from Boost, and several compiler/library distributors currently implement all or part of the components. TR1 is not a complete list of additions to the library that will appear in the next standard; for example, the next standard, C++0x, may include support for threading. There is also a second technical report, TR2, planned for publishing after C++0x *. The new components are in the std: namespace to distinguish them from the current standard library.
Components TR1 includes the following components: Reference Wrapper header file - cref, ref, reference_wrapperSmart Pointers header file - shared_ptr, weak_ptr, etcFunction_object|Function Objects These four modules are added to the header file:Polymorphism (computer science)|Polymorphic Function Wrapper functionFunction Object Binders bindstd: and std:
Function Return Types result_of mem_fn mem_fnstd: and std:
Metaprogramming and Type Traits Random Number Generation header file - variate_generator, mersenne_twister, poisson_distribution, etcMathematical Functions Tuple Datatype|Types header file - tuplestd:
Fixed Size Array header file - arraystd:Hash Tables , header filesRegular Expressions header file - regex, regex_match, regex_search, regex_replace, etcC Compatibility C++ is designed to be compatible with the C programming language, but is not a strict superset of C due to diverging standards. TR1 attempts to reconcile some of these differences through additions to various headers in the C++ library, such as See also Literature | |||||||
|
| ||||||||
![]() |
|
| |