Thanks for the help all, I think a new implementation is in order for me, one with fewer reference data members.
I think I'll also think through my examples a bit better next time. ;)
Thanks for the help all, I think a new implementation is in order for me, one with fewer reference data members.
I think I'll also think through my examples a bit better next time. ;)
Rattenhirn is probably overlooking the mistake you likely made in your code where Some_Other_Class(first); does not create an unnamed temporary object, but a default constructed named object called first. I don't believe that is what you intended, and what Rattenhirn assumed.
Under the assumption that you intended to create a second object with a reference to the first object, then his explanation is correct.
ZOMG, totally missed that one. I learn something new every day!