On Tuesday 10 September 2002 08:29 am, Bertolt Mildner wrote:
[...]
I have tried to make nonnull() inline and/or static but that didn't help. I think the root of the problem is that the address of nonnull() is taken. I wonder if it is really needed to return a real (member) function pointer or if it would be OK to just return (safe_bool)1 ?
Don't know if this is useful but at least it makes my compiler more happy [snip]
{ return (this->empty())? 0 : (safe_bool)~0; } { return (this->empty())? (safe_bool)~0 : 0; }
Unfortunately, that invokes implementation-defined behavior, because (safe_bool)~0 may or may not be the null pointer. Perhaps if we made nonnull a function template it would make precompiled headers possible again... (I _really_ wish I had this compiler to try things on, but thanks for helping out!) Doug