cppreference says that, until C++14, a constexpr function must satisfy the following requirement:
the function body must be either deleted or defaulted or contain only the following:
- null statements (plain semicolons)
- static_assert declarations
- typedef declarations and alias declarations that do not define classes or enumerations
- using declarations
- using directives
- if the function is not a constructor, exactly one return statement
Yet the example contains many other elements.
Is the requirement misstated or am I misunderstanding something?
#if __cplusplus >= 201402Lto exclude code offactorial_cxx14.