This question already has an answer here:
I have the following code where b is list-initialized with another array.
#include <iostream>
#include <array>
int main()
{
std::array<int, 4> a{1,2,3,4};
std::array<int, 4> b{a};
std::cout<<b[3]<<std::endl;
return 0;
}
I am wondering why this code compiles under one compiler used by wandbox.
But it fails by another compiler used by cpp.sh.
Aucun commentaire:
Enregistrer un commentaire