I would like to create a constructor, which is similar to the int
array constructor: int foo[3] = { 4, 5, 6 };
But I would like to use it like this:
MyClass<3> foo = { 4, 5, 6 };
There is a private n
size array in my class:
template<const int n=2>
class MyClass {
public:
// code...
private:
int numbers[n];
// code...
};