Search code examples
c++c++11c++14tr1

Is everything provided by TR1 now available in C++14 and easy to make use of?


We expect that converting old sources from using TR1, to not using it, will be straightforward work such as fixing #includes, changing a few names, and patching the build system, but cannot find a definitive statement that this is so for everything in TR1.

I know C++14 through language enhancements and a new standard library now provides many nice things that were in TR1. Even C++11 took over quite a lot from TR1.

But have all things in TR1 been made available as language and library features? What in TR1 hasn't been eaten by C++14? (Things we don't use, we hope.)

As for TR1 features now in C++14, do any require more effort than simple name changes?


Solution

  • C++ Technical Report 1 (TR1) is the common name for ISO/IEC TR 19768, C++ Library Extensions, which was a document proposing additions to the C++ standard library for the C++03 language standard. The additions include regular expressions, smart pointers, hash tables, and random number generators. TR1 was not a standard itself, but rather a draft document. However, most of its proposals became part of the later official standard, C++11. Before C++11 was standardized, vendors used this document as a guide to create extensions [1].

    Generally, most of the features from TR1 passed to C++11, except some minor exceptions and some renamings in <random> header, shown below:

    <random>

    Also note that from the <type_traits> header in C++17 result_of was replaced with invoke_result.

    [1]: C++ Technical Report 1