Navigation
  • Home
  • Recent
  • Most Active
  • Popular
  • Blog
  • Credits
  • RSS
  •   Interaction
  • Register
  • Statistics
  •   Help
  • Suggestions
  • Contact Us
  • How to Edit
  • Help



  • [Edit]


    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."*

        Technical Report 1
            Overview
            Components
                    Reference Wrapper
                    Smart Pointers
                Function_object|Function Objects
                    Polymorphism (computer science)|Polymorphic Function Wrapper
                    Function Object Binders
                    Function Return Types
                    mem_fn
                Metaprogramming and Type Traits
                    Random Number Generation
                    Mathematical Functions
                    Tuple Datatype|Types
                    Fixed Size Array
                    Hash Tables
                Regular Expressions
                C Compatibility
            See also
            Literature

    top

    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:
    tr1 namespace to distinguish them from the current standard library.


    top

    Components

    TR1 includes the following components:

    top

    Reference Wrapper
      lifted from Boost.Ref *
      additions to the header file - cref, ref, reference_wrapper
      enables passing references, rather than copies, into algorithms or function objects

      top

      Smart Pointers
        based on Boost Smart Pointer library *
        additions to the header file - shared_ptr, weak_ptr, etc

      top

      Function_object|Function Objects
      These four modules are added to the header file:

      top

      Polymorphism (computer science)|Polymorphic Function Wrapper
        function
        based on Boost.Function *
        allows for higher order programming and function object manipulation

      top

      Function Object Binders
        bind
        taken from Boost Bind library *
        generalized version of the standard std:
        bind1st and std:
        bind2nd

      top

      Function Return Types
        result_of
        taken from Boost
        determines the type of a call expression

        top

        mem_fn
          mem_fn
          based on Boost Mem Fn library *
          enhancement to the standard std:
          mem_fun and std:
          mem_fun_ref

        top

        Metaprogramming and Type Traits
          new header file - is_pod, has_virtual_destructor, remove_extent, etc
          based on Boost Type Traits library *
          facilitates metaprogramming by enabling queries on and transformation between different types

        top

        Random Number Generation
          utilities for generating random numbers using various engines and probability distributions

          top

          Mathematical Functions
            mathematical functions

          top

          Tuple Datatype|Types
            new header file - tuple
            based on Boost Tuple library *
            vaguely an extension of the standard std:
            pair
            fixed size collection of elements, which may be of different types

            top

            Fixed Size Array
              new header file - array
              lifted from Boost Array library *
              as opposed to dynamic array types such as the standard std:
              vector

              top

              Hash Tables
                new , header files
                new implementation, not derived from an existing library, not fully API compatible with existing libraries
                like all hash tables, often provide constant time lookup of elements but the worst case can be linear in the size of the container

              top

              Regular Expressions
                new header file - regex, regex_match, regex_search, regex_replace, etc
                based on Boost RegEx library *
                pattern matching library

              top

              C 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 , , , etc. These changes help to bring C++ more in line with the C99 version of the C standard (not all parts of C99 are included in TR1).

              top

              See also

              Boost library, a large collection of portable C++ libraries, several of which were included in TR1
              Dinkumware, the only commercial vendor to fully implement TR1

            top

            Literature
              Peter Becker: "The C++ Standard Library Extensions: A Tutorial and Reference", 2006, ISBN 0321412990. Covers also the TR1 extensions.
     
    Search more:
     

       
    Source Privacy License Download Contact Us Atlas
    Scientus.org Dictionary (Yet Another Wiki) RC : 1.39
    MIT OpenCourseWare
    This article is licensed under the GNU Free Documentation License [copyleft]. It uses material from the Wikipedia article "Technical Report 1". link