3 ms·
This kind of interface has precedent: http://en.cppreference.com/w/cpp/experimental/optional/operator* http://en.cppreference.com/w/cpp/experimental/optional/op
by detrino 11y ago
This kind of interface has precedent: http://en.cppreference.com/w/cpp/experimental/optional/operator* http://en.cppreference.com/w/cpp/experimental/optional/opera...
- SamReidHughes 11y agoI'm not saying the interface is externally bad. The danger and reasoning here is that the implementation could be made bad. STL functions can tolerate that risk, and they don't have the luxury of knowing the object's a std::string on an uncritical path, not some graph node with zillions of back-pointers. (Edit: I think their interface also avoids copying when dealing with non-movable types.)