Any function that consists of a return statement only could be declared constexpr and thus will allow to be evaluated at compile time if all arguments are
constexpr
If the function has side effects, you would not want to mark it constexpr. Example
I can't get any unexpected results from that, actually it looks like gcc 4.5.1 just ignores constexpr