Boost logo

Ublas :

From: Georg Baum (Georg.Baum_at_[hidden])
Date: 2005-05-09 09:38:27


Am Sonntag, 8. Mai 2005 19:33 schrieb Michael Stevens:
> Dear All,
>
> I seem to remember someone posting a patch to work around new unused
> variable warnings from GCC 4.0 in release build.

That was me, the thread was "Bugs with compressed matrix (fixes)".

> Oddly I can't find the posting any more and nothing appears in the archive.
>
> >From recollection most of the warnings we created in cases were the
> > expression
>
> in BOOST_UBLAS_CHECK was not used. I think it may be better to work on the
> warning more directly in the BOOST_UBLAS_CHECK macro.

Yes.

> I have committed the follow experimental definition in 'exception.hpp'
>
> #define BOOST_UBLAS_CHECK(expression, e) \
> if (! (expression) );

Why not

boost::ignore_unused_variable_warning(e);

in the release version? I think that it makes the intention more explicit.

Georg