Let's Make Things Better

‏initialize an stdarray algorithmically at compile time

static constexpr unsigned num_points{ 7810 };
std::array< double, num_points > axis;

for (int i = 0; i < num_points; ++i)
{
axis[i] = 180 + 0.1 * i;
}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.