C++11 initializer lists can be used to initialize vectors and arrays with argument passing to constructors.
I have a piece of code below
There isn't an automatic way to do this using initializer lists, but you could do it algorithmically if you know the first and last values of the enum by just using a for loop to insert the values.
for