I am looking a talk at CppCon called Your New Mental Model for constexpr done by Jason…
Jump to turn (6)
- 1I am looking a talk at CppCon called Your New Mental Model for constexpr done by
- 2In your example, square(5) is guaranteed to be executed at compile-time, while s
- 3In an example, Jason Turner is providing the same code 100% without constexpr an
- 4Can I provide you the two version of code?
- 5100% without constexpr: ~ #include #include #include #include #include #include
- 6100% Compile-Time with constexpr: ~ #include #include #include #include #include
- User
I am looking a talk at CppCon called Your New Mental Model for constexpr done by Jason Turner. However, I am quite stuck while reading the examples he provides. I think I am missing for of all some basic concepts, like exactly what it means with compile-time and run-time. Indeed, it is clear that something done at compile-time means that during the compilation the compiler does this action, while at run-time the application will do it while running. However, it is not totally clear to me what exactly I can do at compile-time, especially related to the input of these actions that I am supposing to do at compile-time. Please provide feedback on topic. If the question is not clear, tell me instead of providing a feedback.
- Assistant