Boost logo

Boost Users :

From: Bertolt Mildner (Bertolt.Mildner_at_[hidden])
Date: 2002-09-10 06:21:57


[...]
> Now I'm completely confused... does code like the following cause a warning?
> (I don't have access to this compiler, unfortunately, but there aren't any
> warnings in the Boost regression tests...)
>
> template<typename T>
> struct foo
> {
> void bar() { int deprecated; }
> };
>
> int main()
> {
> return sizeof(foo);
> }

At least with my compiler settings it will!

Warning : variable / argument 'deprecated' is not used in function
hello.cpp line 51 void bar() { int deprecated; }

Error : illegal type
hello.cpp line 74 return sizeof(foo);

 
> You may also compile with BOOST_FUNCTION_NO_DEPRECATED defined, which will
> completely remove all deprecated functionality.

Thanks, that helped a lot!

BTW: I also have the problem that I can't use Boost.Function together with precompiled headers because of the following error:

Error : illegal use of precompiled header
(included from:
 function.hpp:22
 KeyStorage.h:12
 HostMemoryKeyStorage.h:9
 DesKey.h:11
 MWPrefixWin32.pch++:14)
function_base.hpp line 288 void nonnull() {};

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 ?

Bertolt

-- 
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