GoingNative 32: Sneak Preview of C++17

Play GoingNative 32: Sneak Preview of C++17
Sign in to queue


We barely missed our November "deadline" but the potentially sensitive information in today's episode needed approval from the Sutter himself...

...and we got it! Join us with ISO Committee member (and Microsoft as well, of course =P) Gabriel Dos Reis, who graciously took the time to give us the inside scoop of some things that made it into C++17, as well as things that got taken out. All this is fresh off the press of the most recent C++ Standards Meeting!

Video Topics
[01:23] - GDR introduces himself

New Features:
[03:16] - Generalized constant expressions in template arguments
[07:09] - Nested Namespaces

Removed Features:
[07:58] - Trigraphs
[10:21] - Some relics from C++98 (auto_ptr)

New/Modified Libraries:
[12:04] - Fundamentals (string_view, array_view)
[15:51] - Transactional Memory 
[16:25] - Parallelism/Concurrency 

[17:04] - Uniform Initialization 

[19:00] - What's Next for the Standards Committee 

Other Useful Links
Previous GoingNative Episode on Parallel STL
Download Visual Studio 2015 Preview



Download this episode

The Discussion

  • User profile image
    Deactivated User

    Excited to expect modules being covered and eager to hear about concepts.

  • User profile image
    Tobias Bruell

    Very interesting. Will the "Generalized constant expression in template arguments" allow it to write a template meta-function that takes a string literal (which does not have external linkage) and returns a matching std::integer_sequence<char, ...>?

  • User profile image

    nice description of the features!

    I especially liked that on the next committee meeting "modules" proposal will be discussed and maybe we'll see it in C++17.

  • User profile image
    Gabriel Dos Reis

    @Tobias -- this generalization is independent of whether string literals will be allowed as template arguments. My own personal preference is for the language to support direction expression of ideas, instead of roundabouts; that helps us, programmers, write robust and maintainable codes.

    The relaxations that we just voted in C++17 still require that a non-type pointer constant is either null or designates an object, but not a subobject (so that rules out array subobjects).

    There are a couple of proposals in the work to allow string literals as non-type template arguments. I hope they will be merged and that a good solution will emerge soon. It is much needed :-)

  • User profile image
    Gabriel Dos Reis

    @fenbf -- Thanks for the feedback. We are working very hard and tirelessly to make progress on modules. It is a non-trivial problem, but it is one that has a big productivity impact for C++ programmers. The C++ committee and the C++ community are acutely aware of that; then there are always factors that we can't control. Stay tuned :-)

  • User profile image
    Gabriel Dos Reis

    @Vipul -- Yes, I am very excited about Concepts Lite too. Can't wait to see the corresponding PDTS voted out for community feedback. We've made great progress. You will surely see more from us on that once we have the PDTS (real soon.) Stay tuned :-)

  • User profile image

    The most cooler thing of c++ will be modules. I hope to see that in the next standard 😃

  • User profile image

    I was upset Gaby didn't mention await until literally the last 5 seconds. Wish he would've talked more about it!

  • User profile image

    @Zack -- await deserves its own segment which, no doubt, you will see once SG1+EWG have ironed out the details, hopefully soon :)

  • User profile image

    Can't wait!

  • User profile image

    The interview seemed to suggest string_views are mutable, but that's not
    the case according to the Fundamentals TSv1 and TSv2 doesn't change that.

  • User profile image

    @Ville -- A string_view is an object that provides a reference semantics onto a string object.  So, there are two kinds of mutable operations here: on the view object itself, and on the string refereed to by the view.

     As an object, a string_view object does support a limited set of mutable operations, i.e. remove_prefix() and remove_suffix(), which shrink the "view". 

    You are absolutely and positively correct that the current official versions of a string_view object does not support mutating operations on the refereed-to string object.  

    That being said, one of the requests we made and discussed at the last meeting was to make string_view consistent with the array_view proposal.  The request arose from practical usage and considerations.

    I hope that clarifies things; and I will make sure next editions capture the distinctions :)

  • User profile image

    Thanks Gaby, that clarifies things. And yeah, I think it would be wise to make string_view and array_view consistent, and furthermore I think forcing string_view to be read-only when it comes to the underlying character buffer is draconian. I know how to make things const when I want them const, whereas I do not know how to make things non-const when they are const to begin with. :) That is, assuming SANE operations. ;)

  • User profile image

    Very informative. Its really nice to see the set of standard features available improving, and I'm excited for modules.

  • User profile image

    It's great that even black people get tech jobs.

Add Your 2 Cents