Код: Выделить всё
constexpr auto arr = std::to_array({'f', 'o', 'o'});
< /code>
to < /p>
constexpr std::array arr{'f', 'o', 'o'};
Godbolt
Подробнее здесь: https://stackoverflow.com/questions/795 ... ialization
Код: Выделить всё
constexpr auto arr = std::to_array({'f', 'o', 'o'});
< /code>
to < /p>
constexpr std::array arr{'f', 'o', 'o'};