|
Boost Users : |
From: Jeff Flinn (TriumphSprint2000_at_[hidden])
Date: 2007-11-06 08:02:48
hi eric,
Eric Niebler wrote:
> Jeff Flinn wrote:
>> We compile our app with -Wunused-variables on the Mac with gcc 4.0. We
>> get several unused variable warnings due to
>> <boost/xpressive/regex_primitives.hpp>.
>>
>> Is there some facility for quieting these from xpressive itself? We
>> currently are using #pragma unused ( eol, ...) to quiet the list of
>> about 15 unused variables.
>
>
> Are you using the version of xpressive in 1.34, or in the latest .zip
We're using 1.34.1.
> archive from the Boost file vault? In the latest code, I have tried to
> stifle these warnings by adding the following to regex_primitives.hpp:
>
> namespace detail
> {
> inline void ignore_unused_regex_primitives()
> {
> ignore_unused(repeat_max);
> ignore_unused(inf);
> ignore_unused(epsilon);
> ...
> ignore_unused(keep);
> }
> }
>
> where ignore_unused() is merely:
>
> template<typename T>
> void ignore_unused(T const &)
> {
> }
>
> That seems to work for me. You might try something similar.
Aah, that looks like the trick. Will this make it into 1.35?
Thanks, Jeff Flinn
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