Тема: Питання щодо std::array
Коли створюю масив ось так:
    const int &first_half_size = middle - start + 1;
    const int &second_half_size = end - middle;
    std::array<int, first_half_size> first_half;
    std::array<int, second_half_size> second_half;Видає помилку, що змінні, які визначають розмір масиву є неконстантними виразами.
Але якщо зробити ось так:
    const int &first_half_size = middle - start + 1;
    const int &second_half_size = end - middle;
    int first_half[first_half_size];
    int second_half[second_half_size];Тут усе працює без помилок.
Чому так?