Remember std::tr1
and std::tr2
, which had shared_ptr
etc (lots of Boost, basically), and later became C++11?
Those were Technical Reports (thus the 'tr'). Now we call them Technical Specifications.
(The differences are... technical. Basically, they are still specs, just not the Standard.
They are specs, not "reports" about something, like a report on C++ performance wrt exceptions, etc (which is TR18015)
Also, we put them in std::experimental
. It would be std::ish
but I wasn't there that day :-(
The committee has a number of TSes on the go. Although they are not part of C++17, you can use them NOW.
The biggest addition to C++ since sliced bread.
Available NOW in latest gcc.
In a nutshell,
C++14 | Concepts TS |
---|---|
//
// T must be a Random Access Iterator
// otherwise you will either get the wrong answer,
// or, most likely, terrible compiler errors
//
template <typename T>
auto binarySearch(T first, T second)
{
//...
} |
template <RandomAccessIterator T>
auto binarySearch(T first, T second)
{
//...
}
|
error: syntax error '[' unexpected error: gibberish error: more compiler gibberish error: for pages and pages ... |
error: MyIter does not model RandomAccessIterator |
Encapsulation at the component level
(Precompiled headers on steroids. Don't tell Gaby I said that.)
Available NOW in Visual Studio and clang.
(a.k.a. Gor-routines.) Similar to await
et al from C#, python, etc. But, of course, better.
Available NOW in Visual Studio.
Nothing less than STL 2.0
https://github.com/ericniebler/range-v3
Boost ASIO.