From: Aleksey Gurtovoy (alexy_at_[hidden])
Date: 2001-03-22 08:36:35
Dave Abrahams wrote:
> > It does specify under what circumstances the function can
> > fail (ignoring any kind of misuse), and the only situation
> > when it can happen is "if another window has the clipboard
> > open", which I consider to be a programmer's error.
> FWIW, note that the docs say "if", rather than "if and only if".
Right, because it will also fail if you pass an invalid HWND to it, or do
something similar :).
Anyway, the point of the 'clipboard' example was that there are cases when
separation of assert()s from the mainline code leads to a code bloat, and
'VERIFY'-like macro is quite useful in such situations. I agree that the
example was controversial, though, something like '::FillRect' would
probably cause less disagreement about validity of the assertions there.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk