Theorem says that we cannot initialize an array as a copy of another array.
But we can initialize pointer as a copy of pointer that points to the first element of another array:
int a[] = {0, 1, 2};
int a2[] = a; //error
int *a3 = a; //OK
Why int a2[] = a; is an error?
Arrays can’t be assigned to or initialized from another array object in C++ because they can’t in C, and they can’t in C for historical reasons that aren’t really relevant any more.
In very early proto-C, there would have be some confusion whether an assignment like
int a[] = {0}; int b[] = {0}; a = b;should copy the contents of arraybtoa, or re-seat the nameato refer tob. Likewise with initialization, whetherashould be a copy ofbor an alias. This ambiguity hasn’t existed for 40 years: it soon became clear that if it were to be allowed then the sensible meaning in C (and C++) would be that it should copy, but arrays in C were never made into “proper” value types.There’s no technical reason why it’s impossible, and for example you can assign a struct type that has an array as a data member. The standard simply doesn’t define your code to be correct C++.
The behavior of pointers isn’t directly relevant to this. Initializing a pointer (to point to the first element of an array) is a different operation from initializing an array and its contents, and the language allows different things on the RHS.