
22 Aug
2007
22 Aug
'07
11 p.m.
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). -Howard