this->skeleton is a Skeleton&. auto will infer Skeleton. A copy is created. The copy is a shallow copy, which gets destructed at the end of the block. Which smokes the internals of the original Skeleton. Which makes things go boom.

auto is now banned in my C++ code bases.

Follow

@badlogic If copying a Skeleton destroys the original, it seems to me that it's not intended to ever be copied, so it would make sense to remove its copy conductor.

That said, this remains a footgun for mutating accesses.

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.