Consider the code:
const Resource& r = ResourceContainer("foo").myResource;
What does the standard say about the lifetime of myResource?
Similar, but not sure if this is equivalent: now imagine that it was being implicitly converted via operator const Resource&()
. Does that make a difference?
const Resource& r = ResourceContainer("foo");