vendredi 16 juillet 2021

Array initialization differences C++11

Is there a difference between using curly braces or the assignment operator while defining an array in C++11?

std::array<int, 2> a{1, 2}
// or
std::array<int, 2> b1

and

std::array<int, 2> = a{1, 2}

Aucun commentaire:

Enregistrer un commentaire