Boost logo

Boost Users :

From: Bertolt Mildner (Bertolt.Mildner_at_[hidden])
Date: 2002-09-10 10:35:07


"Douglas Gregor" <gregod_at_[hidden]> schrieb im Newsbeitrag news:200209101109.28788.gregod_at_cs.rpi.edu...
> On Tuesday 10 September 2002 10:56 am, Bertolt Mildner wrote:

[...]
> struct dummy {
> template<typename T> void nonnull() {};
> };
>
> typedef void (dummy::*safe_bool)();
>
> operator safe_bool () const
> { return (this->empty())? 0 : &dummy::nonnull<int>; }
>
> safe_bool operator!() const
> { return (!this->empty())? 0 : &dummy::nonnull<int>; }
>
> If it works, I'll put the workaround into CVS.

Now I get:

Error : ambiguous access to overloaded function
(included from:
 function.hpp:22
 KeyStorage.h:12
 HostMemoryKeyStorage.h:9
 DesKey.h:10
 MWPrefixWin32.pch++:14)
function_base.hpp line 298 { return (!this->empty())? 0 : &dummy::nonnull<int>; }

-- 
Free Crypto Token - FCT
www.FreeCryptoToken.org

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net