constexpr
Values and functions that can be evaluated at compile time.
Intermediate
constexpr uint32_t baud_div(uint32_t clk, uint32_t baud) { return clk / (16 * baud); } — compile-time tables, zero run-time cost.
Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.
Discussion (0)
Sign in or join free to ask questions and discuss this topic.