I have the following code which could not be complied.
using namespace std;
void f(int);
template
void array_ini_1d(T1 (&x)[
Template parameters must be resolved at compile-time.
There is no way that a function template with parameter size_t N can match any sort of array or other container whose size comes from a run-time input.
You will need to provide another version of the array_1d_ini which does not have the size as a template parameter.