Boost logo

Geometry :

Subject: Re: [geometry] Fixing unused variable/typdef warnings
From: Adam Wulkiewicz (adam.wulkiewicz_at_[hidden])
Date: 2014-06-03 06:35:32


Hi,

2014-06-03 7:53 GMT+02:00 Menelaos Karavelas <menelaos.karavelas_at_[hidden]>:

> Hi Adam.
>
>
> On 03/06/2014 01:15 πμ, Adam Wulkiewicz wrote:
>
> Hi,
>
> For those of you which doesn't follow the discussion on Boost developers
> mailing list. We now have a new module, Boost.Core. It's a module for
> various light-weight tools with nearly no dependencies. Headers from
> Utility, Detail, etc. are being moved into it.
>
> Today the new tool was added - boost::ignore_unused(). More or less it's
> upgraded boost::ignore_unused_variable_warning(). It allows handling more
> unused variables than one and unused typedefs as well. Like this:
>
> #include <boost/core/ignore_unused.hpp>
>
> // ...
>
> boost::ignore_unused(v1, v2, v3);
> boost::ignore_unused<T1, T2, T3>();
>
> I'd like to use it to fix GCC >=4.8 unused local typedefs warnings (in
> strategies concept checks). This means that in order to properly build
> tests you'd need to update ModularBoost (and if needed manually initialize
> the new module - I was forced to do it on Windows but maybe I did something
> wrong).
>
> Are you ok with this?
>
>
> I recently updated to Ubuntu 13.10, where g++ 4.8 is the default compiler.
> When trying to compile unit tests I got all sort of unused typedef
> warnings, which was really annoying, and I had to install g++ 4.7 to be
> able to avoid them. Hopefully what you propose will change this.
>
>
I also fixed some unused variables warnings in some libraries which
Geometry depends on.
I'm only waiting on uBlas to merge my PR, also with the msvc-12 error fix :/

To disable those unused typedefs warnings you can pass a parameter to the
compiler like this:

b2 cxxflags="-Wno-unused-local-typedefs"

> BTW, it would be convenient to explain in more detail what you mean by
> "initialize the new module".
>
>
When I switched to develop branch in the modular-boost and pulled, the
libs/core/ directory was created but was empty. AFAIR this helped:

git submodule init libs/core
cd libs/core
git checkout develop
git pull

Regards,
Adam

P.S. http://git-scm.com/docs/git-submodule



Geometry list run by mateusz at loskot.net