So, what exactly is here now and coming soon for C++?

First off, compilers. Clang is the front-runner, GCC is close, and Visual Studio 2015 is catching up but still incomplete.

Most annoyingly, VS 2015 doesn’t fully support C++11. It doesn’t have expression SFINAE, and its constexpr support is close but complete.

Clang 3.4 and GCC 4.9 both fully support C++14. Visual Studio 2015 lacks variable templates, extended constexpr, and aggregate member initialization in its core langauge support. I think that library support for Visual Studio is complete except for the bits that can’t be done due to missing core language features.

C++11

There are now a lot of books covering C++11 in depth. Some precis:

C++14

Not much was added to the core language with C++14, true, but on the other hand, these changes made so-so features in C++11 into much better, more useful features. Some other write-ups on these features:

Binary literals and digits separator.

I just wish that the digits separator wasn’t so unusual, but I’ll get used to it.

auto a = 0b100'0001;  // ASCII 'A'

Variable templates

Not to be confused with variadic templates - this allows you to have templates that wrap variables. Now you can have a template that is a templated variable, and really largely to write parameterized constants with constexpr in a more straightforward fashion.

// math constant with precision dictated by actual type
template<typename T> constexpr T pi = T(3.14159265358979323846);

Extended constexpr

This is huge, because it extends what you can do with constexpr functions. You can write loops as opposed to resorting to recursion. Specifically, your constexpr functions can have local variables, and use if, switch, for, while, or do…while (just not goto).

constexpr int fact(int n)
{
    int sum = n;
    while (n > 1)
    {
    	sum *= n;
    	n -= 1;
    }
    return sum;
}

C++17

Obviously, C++17 is still baking. What’s likely to be in it?

First off, an internal position paper that Stroustroup wrote escaped to the wild, so he re-published it: Thoughts about C++17. His goals are roughly “better support for large-scale programs, better support for concurrency, simplify core language use”.

The best thing to read at the moment is this: Trip Report: C++ Standards Meeting in Kona, October 2015). It’s long but well worth your time.

My favorite small things:

  • UTF-8 character literals: u8”string”
  • default message for static_assert
  • std::auto_ptr is gone

Something that’s baking but has hope

  • std::variant (similar to [Variant v5](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0088r0.pdf) but it throws on invalid move).

Some medium things

  • operator dot (“operator.”) - fixing a hole in original C++ overloaded operators.
  • uniform call syntax
  • namespace and enumerator attributes

Some big things

  • concepts light
  • coroutines
  • await (part of stackless coroutines, but might make it as a keyword on its own)

There’s a lot on the library front

  • asio likely to be the official C++ network library
  • stackful coroutines can be done at the library level

What’s almost certainly not going to make C++17?

  • modules - I find both current proposals half-baked, so this is a relief.
  • contracts - similar, don’t think it’s thought through enough yet.

Here’s the list of C++17 candidate papers