Darren New wrote:
> assert(x < 10) <<
> "The value x is " << x << " but that's too small";
>
> The only way I can see this working is if assert returns either a
> subclass with operator<< defined to do nothing, or with operator<<
> defined to log something. In the latter case, the destructor would exit
> the program? Would that work?
There is also the chance that assert is a macro making god knows what
hackish stuff :)
Post a reply to this message
|