C++

Compile time evaluation in Nim, Zig, Rust and C++

Evaluating code at compile time is a capability that most, if not all, compiled programming languages possess, even if it can't be directly used by the programmer, but rather applied as an optimization. In this post, we'll explore a bit how to execute code at compile time in Nim, Zig, Rust and C++.