I am using test code with some test data as below. I would really like to eliminate count from the array declaration. Is it possible? Also why does double braces = {{ ... }}
are required?
struct test_data {
std::vector<int> nums;
int turnToStop;
int expectedResult;
};
int main()
{
std::array<test_data, 5> tests = {{
{{2, 1, 3}, 2020, 10},
{{1, 2, 3}, 2020, 27},
{{2, 3, 1}, 2020, 78},
{{3, 2, 1}, 2020, 438},
{{3, 1, 2}, 2020, 1836}
}};
}