— ptr to primitive or ptr to class type
float* newPtr = oldPtr; // copies address of the wrapped object. This is what happens in a default copier and assignment
— primitive ref assignment
overwrite object State, just like java primitive assignment.
Note if a class has a ref field and a ptr field, they behave differently during the field-by-field class assignment!
— class type ref assignment
MyClass& newRef = someRef;
newRef = oldRef; // overwrites object state, field by field
— primitive nonref assignment
— class type nonref variable
MyClass v; // ctor
v = v2; // field by field state overwrite by assignment operator
——various types of variables to look at
) Primitives ^ class types
) Pointer(and ref) ^ nonref types
A very detailed stroke-by-stroke on assignment overload — http://icu-project.org/docs/papers/cpp_report/the_anatomy_of_the_assignment_operator.html