Optimizing return values--Marco Foco
Marco Foco shows different solutions and tradeoffs to a dangling reference problem:
Optimizing return values
by Marco Foco
From the article:
As you can see, class C contains a function
get()which returns a reference to its internal state. In normal code, we must take care not to use this reference after our class has been destroyed...

The CppCon YouTube Channel now has all 2016 videos.