Answer
consteval declares an 'immediate function' that must be evaluated at compile time—every call must produce a constant, otherwise it's a compile error. Unlike constexpr (which may run at compile or run time), consteval guarantees compile-time evaluation, useful for functions that must never incur runtime cost or that generate compile-time-only values.
consteval int cube(int x) { return x*x*x; }
constexpr int c = cube(3); // OK
// int r = cube(runtimeVar); // error: not constantReal-world example A consteval function guarantees a hash or ID is computed at compile time, never at runtime.