Why are arrays of references illegal?

Answering to your question about standard I can cite the C++ Standard §8.3.2/4:

There shall be no references to references, no arrays of references, and no pointers to references.

That’s because references are not objects and doesn’t occupy the memory so doesn’t have the address. You can think of them as the aliases to the objects. Declaring an array of nothing has not much sense.

Leave a Comment