Cpp - Keywords


Constexpr

constexpr evaluates a function or variable at compile time, as opposed to execution time.

constexpr int square(int n) {
    return n * n;
}

int main() {
    constexpr int v = square(5); // 25
}