One would even wonder how to set up such a list, since wouldn't all the nodes have to come to existence at the same time? And how would you find the end of the list, seeing as there is no NULL reference?
If references give the compiler more optimization possibilities, it's because they are more restricted than pointers. If they weren't, those optimization possibilities wouldn't be there either.
Edit:
Ok the linked list appears to be possible. There isn't much point in it, though:
Code:
#include <iostream>
struct Node
{
int value;
Node& prev;
Node& next;
};
int main()
{
Node linked_list[3] = {
{1, linked_list[0], linked_list[1] },
{ 2, linked_list[0], linked_list[2]},
{3, linked_list[1], linked_list[2]}};
Node* current = &linked_list[0];
Node* previous = current;
do {
std::cout << current->value << '\n';
previous = current;
current = ¤t->next;
} while (current != previous);
}