Item 42: Make sure less<T> means operator<
As all Widget-savvy people are aware, Widgets have both a weight and a maximum speed:
class Widget {
public:
...
size_t weight() const;
size_t maxSpeed() const;
...
};
You are currently reading a PREVIEW of this book.
Get instant access to over
$1 million worth of books and videos.
Start a Free Trial