Compile-time constant expressions are not permitted to invoke undefined behaviour. This includes constexpr functions that are evaluated at compile-time.
This property can be used to statically test code, ensuring that the code doesn't invoke undefined behaviour.
Compiler Explorer link: https://compiler-explorer.com/z/3x78r4nMr