Depending on the source of n, the answer is probably no. In case n can be a constexpr, then the answer is yes.
See this SO post for more information about constexpr: Should I declare a constant instead of writing a constexpr function?Should I declare a constant instead of writing a constexpr function?