Why the C++ code below can't be compiled?
#include <utility>
int main() {
int x[6];
int y[6];
std::pair<int[6], int[6]> a(x, y);
return 0;
}
For example MSVC gives the following error:
error C2661: 'std::pair<int [6],int [6]>::pair': no overloaded function takes 2 argument
Thanks for the comments that using C++ alternatives to construct arrays, but I also want to know the reason that the code can't be compiled.