Hello,
So I'm looking through some code, and I see this:
class whatever
{
public:
void SomeFunc(SomeClass& outVal)
{
outVal = m_q.front();
m_q.pop();
}
private:
std::queue<SomeClass> m_q;
};
This doesn't seem like outVal would be a valid reference any more... However, it appears to work.
I've seen this in other code before too, is this valid? Thanks