On Friday 07 June 2002 9:19 am, Lars Gullik Bjønnes wrote:
> Angus Leeming <[EMAIL PROTECTED]> writes:
> | Woo hoo! I have a decent compiler again!
> |
> | As for the warnings, there are thousands of em, especially in the boost
> | code! there are also some errors about stuff that's now in namespace std,
> | but that's by the by.
> |
> | However, these two warnings might prove important given the recent angst
> | with boost::functions. I haven't investigated at all of course...
>
> ... but is the warnings really valid...
>
>
>     result_type operator()(BOOST_FUNCTION_PARMS) const
>     {
>       assert(!this->empty());
>
>       policy_type policy;
>       policy.precall(this);
>
>       internal_result_type result = invoker(function_base::functor
>                                           BOOST_FUNCTION_COMMA
>                                           BOOST_FUNCTION_ARGS);
>
>       policy.postcall(this);
> #ifndef BOOST_NO_VOID_RETURNS
>       return static_cast<result_type>(result);
> #else
>       return result;
> #endif // BOOST_NO_VOID_RETURNS
>     }

Well, I guess that depends on what you mean by "valid". Here 
BOOST_NO_VOID_RETURNS is NOT defined and result_type is void, so we have 
static_cast<void>(result);

Personally, I think that the compiler is being pretty smart to spot that the 
result is being thrown away!

Angus

Reply via email to