Is there any way to construct an array of non default constructible objects of numObjects
length where numObjects
is a template argument? For example...
struct NonDefaultConstructibleClass
{
NonDefaultConstructibleClass(int){}
};
template<size_t numObjects>
struct Thing
{
Thing() : m_Objects{{3, 3, 3, /*... numObjects times */}} {}
NonDefaultConstructibleClass m_Objects[numObjects];
};