Summary
Jason presents the third in his series of C++ homework assignments, challenging viewers to maximize the use of constexpr in their code. Using the 'smallpt' ray tracer as an example, he explains how making functions and variables constexpr can shift calculations from runtime to compile time, potentially enabling the entire scene rendering to happen during compilation. He notes some of the challenges involved, including finding or implementing constexpr versions of mathematical functions like square root and random number generators, while encouraging viewers to observe how code gradually transforms into data in the compiled output as more elements become compile-time constants.
Related C++ Standard Sections
This episode covers topics found in these sections of the C++ standard:
-
[c.math]40% match