I need to pass arguments to a wrapper class that looks like a minimal example:
template<class TStack, unsigned int TBins> class Wrapper : Stack<......> { std::array<TStack, TBins> m_oStacks; template<typename ... Args> Wrapper(std::initializer_list<const unsigned int> const& size, Args&&... args) : Stack<.......>(args), m_oStacks{5,2,3,4,5,6,7,8,9,10}
I tried to initialize an array with the size of initializer_list, but nothing works (the commented parts of the source) only part of the constant {5,2,3,4,5,6,7,8,9,10} does
Does anyone know the reason and fix?
Regards Matyro
Edit 1: The main problem is that TStack (in most cases) does not have a default constructor, so I need to initialize the array when building
source share