From: Howard Hinnant (howard.hinnant_at_[hidden])
Date: 2007-08-22 19:00:55
On Aug 22, 2007, at 6:46 PM, Emil Dotchevski wrote:
> I'm not convinced that std::condition is more special in terms of
> performance requirements than say std::vector or std::for_each.
> There are plenty of other components that are commonly used in
> performance-critical code -- which is precisely why the standard
> does not
> require such components to detect and report errors
std::vector currently reports errors via throwing a std::length_error
whenever the size() threatens to exceed max_size(). This is arguably
a logic error since both size() and max_size() could be inspected
before any insert or push_back.
There is precedent for error checking in vector (though not for_each).
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk