Error: Function call is not allowed in a constant expression