>>107711740
C-gooners will defend this:
class Widget {
public:
std::string name(){ return name_; }
};
log("processing " + widget.name()); // compiles... dangling string!
const Widget& cfg = getConfig();
cfg.name(); // compile error - good catch? No, just pain
// variant that silently kills you:
std::string s = widget.name() + ".txt"; // temporary dies, dangling
openFile(s); // boom (very common bug pattern)