~/talk

Removing Metaprogramming From C++, Part 1 of N: constexpr Function Params

Talkat CppCon 2019 · 2019-09-15..09-20· [compilers-and-language-design, c-and-cpp]
links:none on file
slides:none on file

Proposes letting a function parameter be marked as constexpr so callers can pass compile-time values without templates, adds an is_constant_expression check and a maybe constexpr (overload tiebreaker) idea, shows concrete wins: tuple/array indexing with compile-time bounds, compile-time regex compilation, a bounded-integer API that becomes plain ints for callers, and easier perfect-forwarding of mixed compile/runtime args. Paper is on GitHub, EWG votes June: not merged for C++20 but 27–4 encourages more work, targeting C++23.

AI-written summary · about

  1. 0:00Introduction to proposal
  2. 1:09Current constexpr mechanics
  3. 6:19The proposed features
  4. 9:21Design goals and philosophy
  5. 14:55Bridging templates and functions
  6. 21:07Simplifying library design
  7. 24:37Concrete use cases
  8. 30:46Limitations and performance
  9. 33:38Metaprogramming replacement
  10. 39:56Standardization progress
  11. 47:17Related C++20 features
  12. 52:13Syntax and conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.