Description of problem: When compiling with -Wshadow I get complaints. The error messages, and the code fixes are shown below. Additional info: /usr/include/boost/spirit/core/non_terminal/impl/rule.ipp:227: warning: declaration of 'p' shadows a member of 'this' BEFORE: concrete_parser(ParserT const& p) : p(p) {} AFTER: concrete_parser(ParserT const& p_) : p(p_) {} /usr/include/boost/spirit/core/impl/match.ipp:24: warning: declaration of 'length' shadows a member of 'this' BEFORE: template <typename T> inline match<T>::match(std::size_t length, ctor_param_t val_) : len(length), val(val_) {} AFTER: template <typename T> inline match<T>::match(std::size_t length_, ctor_param_t val_) : len(length_), val(val_) {} /usr/include/boost/spirit/core/scanner/scanner.hpp:243: warning: declaration of 'iteration_policy_t' shadows a member of 'this' From line 240, BEFORE: bool at_end() const { typedef typename PoliciesT::iteration_policy_t iteration_policy_t; return iteration_policy_t::at_end(*this); } value_t operator*() const { typedef typename PoliciesT::iteration_policy_t iteration_policy_t; return iteration_policy_t::filter(iteration_policy_t::get(*this)); } scanner const& operator++() const { typedef typename PoliciesT::iteration_policy_t iteration_policy_t; iteration_policy_t::advance(*this); return *this; } AFTER: bool at_end() const { return PoliciesT::iteration_policy_t::at_end(*this); } value_t operator*() const { return PoliciesT::iteration_policy_t::filter(PoliciesT::iteration_policy_t::get(*this)); } scanner const& operator++() const { PoliciesT::iteration_policy_t::advance(*this); return *this; }
Fix pending. It would be great to get a simple test case that I could use to verify patch. Also, note that this is still not fixed upstream. I'll ping the boost list for you about this, with your patch. -benjamin
Modulo scanner.hpp patch.