January 2019
Intermediate to advanced
320 pages
9h 18m
English
This chapter covers
Usingconstexpr-if to perform branching at compile-timestd::invoke and std::applyThe normal way to think of programming is that we write code, we compile it, and then the user executes the compiled binary. This is the way programming works for the most part.
With C++, we can also write a different kind of program—one that the compiler executes while it compiles our code. This might seem like a strange thing to do (how useful can it be to execute code when we have no input from the user and no data to process?). ...
Read now
Unlock full access