~/talk

“Variable Templates and Compile-Time Computation with C++14"

Talkat CppCon 2015 · 2015-09-21..09-25· [compilers-and-language-design]
slides:none on file

C++14 variable templates plus relaxed constexpr let the compiler build real constants: this uses variable templates and integer_sequence to emit a 20×20 multiplication table as a compile-time string, verified with static_assert, and to generate a compile-time sine lookup via a crude Taylor series into a variable template. code uses a tiny std::array replacement to return arrays from constexpr functions, relies on return type deduction, and works but easily exceeds compiler evaluation limits (default ~1,000,000 steps) and causes long compile times.

AI-written summary · about

  1. 0:00Intro
  2. 2:31C++03 Compile-time Computation
  3. 3:52C++11 Feature: constexpr variables and static assert()
  4. 5:53C++11 Compile-time Computation
  5. 9:35Reminder: functions, templates, patterns
  6. 11:14C++11 standard mistake: literal types
  7. 12:12User-defined Literals vs Literal Types
  8. 14:05Variable Templates
  9. 18:47C++14 constexpr function rules
  10. 20:01C++14 Compile-time Computation
  11. 23:38Literal Types and constexpr
  12. 27:17Limitation: Parameters
  13. 29:13integer_sequence/index_sequence
  14. 32:55compile-time sequence handling
  15. 37:59Converting numbers to CTS
  16. 41:48Computing with integer_sequence
  17. 44:55character_sequence from a row
  18. 49:16putting table together...
  19. 51:53A table with sine values for a circle
  20. 53:19constructing the table
  21. 54:58using degrees for constants
~/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.