Just making sure of pointer and reference usage.
When I dissambled without optimization I got no difference between pointer and reference, since references will be compiled into pointers.
When optimization turned on, it seems those references will be "subtituded" to the original object and sometimes function calls will be inlined due to this subtitution mechanism, otherwise it will stay as pointer.
However even with optimization, exported function both reference return value and reference arguments will be compiled into pointers.
So, technically we may conclude that reference is usually pointer.
Conceptually, references are always valid and pointing to existed object, while pointers might be either valid, NULL or points to yet another uknown things.
But why no reference to static/dynamic arrays?
Why no circular reference?
It seems hard to make Node class with references.
Code:class Node {
bool empty;
Node &previous;
Node &next;
};