Spooky. On Mon, Sep 22, 2008 at 11:18:14PM +0200, Markus Wanner wrote: > Hi, > > Zack Weinberg wrote: >> I'm honestly surprised .empty() and .size() == 0 don't generate >> identical code, but hey. Thanks! > > For example for doubly linked lists, it's pretty simple to tell whether > they are empty or not, but counting the number of elements in the list > requires traversing the list. > > I'm not sure how other containers are affected. Plus some STL > implementations might have optimizations for .size() to not require it to > traverse the elements. However, its an optimization not required by the > standard, AFAIK. > > Regards > > Markus > > > > _______________________________________________ > Monotone-devel mailing list > [email protected] > http://lists.nongnu.org/mailman/listinfo/monotone-devel
-- I'm Mr. T and this is my Nightelf Mohawk. _______________________________________________ Monotone-devel mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/monotone-devel
