You already provided the solution by using a so-called non-type template parameter
template <int x>
To my knowledge, there is currently no other way to provide constexpr parameters to a function. That is literally what non-type template parameters are for.