From: Daryle Walker (darylew_at_[hidden])
Date: 2000-11-07 00:12:54
on 11/5/00 11:57 AM, David Abrahams at abrahams_at_[hidden] wrote:
> Why does Wrapped1 have an operator void* while Wrapped2 has an operator bool?
It is supposed a proof-of-concept that 'capable_of_not' will work with any
type (conversion) that can act as a Boolean, not just 'bool.'
> The following is awfully strange:
> " // I saw this trick in someone else's code once. I guess it
> // provides proof in case assert is a function instead of a macro.
> using namespace std;"
> 1. "Proof" of what?
I meant _proof_ as "protection," not "something to prove." If 'assert' is a
function, it would need the 'std::,' but it wouldn't if it is a macro.
Bringing the whole 'std' namespace will make either method work. However...
> 2. assert can never be an ordinary function. It is required to work without
> std:: qualification. What are you aiming at here?
...it is not needed since you told me that 'assert' will always be a macro.
I saw someone else use this technique, without documentation, in some other
Boost vault contribution, and I assumed its use. I guess I don't need it.
-- Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk