Loading…
CppCon 2019 has ended
Thursday, September 19 • 09:00 - 10:00
Removing Metaprogramming From C++, Part 1 of N: constexpr Function Parameters

Log in to save this to your schedule and see who's attending!

C++ has, buried within it, no less than four "general-purpose" programming languages. We have regular run-time C++, constexpr, templates, and macros. This presentation will cover a new proposal for C++: constexpr Function Parameters. It aims to make C++ a much more powerful language by helping to merge constexpr programming into regular C++. This will allow writing code that is faster, is easier and more natural to use, is terser, and catches errors at compile time. This new language feature would provide a way to annotate a function parameter as constexpr, letting you do things like overload on whether something is a compile-time constant, or pass constants to things that cannot have template parameters (like constructors and operators).

This presentation will focus on the principles used in the design of C++ and in this feature. From those principles, we will go into the details of the proposal. This presentation will briefly cover what constexpr is used for as of C++20 (the version of C++ that is being finalized now and will be officially 'released' in 2020). The proposal for constexpr function parameters is targeted at C++23 ('released' in 2023). The presentation will briefly cover the standardization process and timeline.

Recommended background (none of these are necessary, but they are helpful):
* No Shadow Worlds: https://probablydance.com/2015/02/16/ideas-for-a-programming-language-part-3-no-shadow-worlds/
* Inventing on Principle: https://vimeo.com/36579366
* constexpr: Introduction (as of C++11 and C++14) https://www.youtube.com/watch?v=fZjYCQ8dzTc

The proposal paper can be found at https://github.com/davidstone/isocpp/blob/master/constexpr-parameters.md

Speakers
avatar for David Stone

David Stone

Software Engineer, Uber
David Stone works on autonomous vehicles at Uber in Louisville, Colorado. He is a member of the C++ standardization committee, where he chairs the Modules Study Group (SG2) and is the vice chair of the Evolution Working Group. He has written an algorithm that solved the traveling... Read More →



Thursday September 19, 2019 09:00 - 10:00
Summit 8/9

Attendees (188)




Twitter Feed