Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-11-16 10:57:38

"Stephan T. Lavavej" <stl_at_[hidden]> writes:

> Hi,
> Boost CVS from November 15, 2003 does not compile cleanly under gcc's
> -Wshadow. I have previously pointed out similar problems in date_time and
> tokenizer (in this message:
> and they were fixed
> rapidly. I've only just now tried to compile an application using regex.
> I'll only quote the relevant portions of lines, not the full lines
> themselves.
> In boost/regex/v4/regex_compile.hpp:
> Line 1329:
> set_expression(const charT* p, const charT* end, flag_type f)
> The argument end shadows a member function named end.
> The fix is to rename the argument and all uses of that argument.
> Line 1425:
> traits_size_type syntax = traits_inst.syntax_type(c);
> This shadows Line 1391:
> traits_size_type syntax = traits_inst.syntax_type(c);
> The fix is to rename the second syntax and all uses of it. (Because the
> code is very complicated and the shadowing is not as simple as an argument
> colliding with a member function, I am extremely hesitant to fix this
> myself.)

I am reluctant to cater to every possible warning. This is an example
of one which often flags perfectly good code. Should we try to come
to a concensus about this? Should we go the other direction, and
simply enable all warnings in our Boost.Build toolsets?

Dave Abrahams
Boost Consulting

Boost list run by bdawes at, gregod at, cpdaniel at, john at