C++11 initialize array with uniform value in constexpr function
- by marack
I have a class template which builds a simple array based on the template parameters as one of its members. I need to be able to initialize every element in the array to a single value in one of the constructors. Unfortunately this constructor must be constexpr.
The relevant part boils down to:
template <typename T, size_t N>
class foo
{
…