Is the following code safe?
I would say not since a reference to a temporary object is kept. Or is there RVO in action here so it might break on another compiler?Code:GroupSet GetSettings() { GroupSet g; /*fill g*/ return g; }
GroupSet &refSet = Gettings();