Ticket #4713: boost.spirit.warnings.patch

File boost.spirit.warnings.patch, 4.8 KB (added by caolanm@…, 12 years ago)

fix for shadow warnings

  • boost/spirit/home/classic/error_handling/exceptions.hpp

    diff -ru boost_1_40_0.orig/boost/spirit/home/classic/error_handling/exceptions.hpp boost_1_40_0/boost/spirit/home/classic/error_handling/exceptions.hpp
    old new  
    126126        typedef unary<ParserT, parser<self_t> >         base_t;
    127127        typedef unary_parser_category                   parser_category_t;
    128128
    129         assertive_parser(ParserT const& parser, ErrorDescrT descriptor)
    130         : base_t(parser), descriptor(descriptor) {}
     129        assertive_parser(ParserT const& parser, ErrorDescrT descriptor_)
     130        : base_t(parser), descriptor(descriptor_) {}
    131131
    132132        template <typename ScannerT>
    133133        struct result
     
    222222
    223223        error_status(
    224224            result_t result_ = fail,
    225             std::ptrdiff_t length = -1,
     225            std::ptrdiff_t length_ = -1,
    226226            T const& value_ = T())
    227         : result(result_), length(length), value(value_) {}
     227        : result(result_), length(length_), value(value_) {}
    228228
    229229        result_t        result;
    230230        std::ptrdiff_t  length;
  • boost/spirit/home/classic/utility/functor_parser.hpp

    diff -ru boost_1_40_0.orig/boost/spirit/home/classic/utility/functor_parser.hpp boost_1_40_0/boost/spirit/home/classic/utility/functor_parser.hpp
    old new  
    5454            typedef typename ScannerT::iterator_t   iterator_t;
    5555
    5656            iterator_t const s(scan.first);
    57             functor_result_t result;
    58             std::ptrdiff_t len = functor(scan, result);
     57            functor_result_t functor_result;
     58            std::ptrdiff_t len = functor(scan, functor_result);
    5959
    6060            if (len < 0)
    6161                return scan.no_match();
    6262            else
    63                 return scan.create_match(std::size_t(len), result, s, scan.first);
     63                return scan.create_match(std::size_t(len), functor_result, s, scan.first);
    6464        }
    6565    };
    6666
  • boost/spirit/home/classic/utility/loops.hpp

    diff -ru boost_1_40_0.orig/boost/spirit/home/classic/utility/loops.hpp boost_1_40_0/boost/spirit/home/classic/utility/loops.hpp
    old new  
    4747        typedef fixed_loop<ParserT, ExactT>     self_t;
    4848        typedef unary<ParserT, parser<self_t> >  base_t;
    4949
    50         fixed_loop (ParserT const & subject, ExactT const & exact)
    51         : base_t(subject), m_exact(exact) {}
     50        fixed_loop (ParserT const & subject_, ExactT const & exact)
     51        : base_t(subject_), m_exact(exact) {}
    5252
    5353        template <typename ScannerT>
    5454        typename parser_result <self_t, ScannerT>::type
     
    112112        typedef finite_loop <ParserT, MinT, MaxT> self_t;
    113113        typedef unary<ParserT, parser<self_t> >   base_t;
    114114
    115         finite_loop (ParserT const & subject, MinT const & min, MaxT const & max)
    116         : base_t(subject), m_min(min), m_max(max) {}
     115        finite_loop (ParserT const & subject_, MinT const & min, MaxT const & max)
     116        : base_t(subject_), m_min(min), m_max(max) {}
    117117
    118118        template <typename ScannerT>
    119119        typename parser_result <self_t, ScannerT>::type
     
    196196        typedef unary<ParserT, parser<self_t> > base_t;
    197197
    198198        infinite_loop (
    199             ParserT const& subject,
     199            ParserT const& subject_,
    200200            MinT const& min,
    201201            more_t const&
    202202        )
    203         : base_t(subject), m_min(min) {}
     203        : base_t(subject_), m_min(min) {}
    204204
    205205        template <typename ScannerT>
    206206        typename parser_result <self_t, ScannerT>::type
     
    253253
    254254        template <typename ParserT>
    255255        fixed_loop <ParserT, ExactT>
    256         operator[](parser <ParserT> const & subject) const
     256        operator[](parser <ParserT> const & subject_) const
    257257        {
    258             return fixed_loop <ParserT, ExactT> (subject.derived (), m_exact);
     258            return fixed_loop <ParserT, ExactT> (subject_.derived (), m_exact);
    259259        }
    260260
    261261        ExactT m_exact;
     
    283283
    284284       template <typename ParserT>
    285285       typename impl::loop_traits<ParserT, MinT, MaxT>::type
    286        operator[](parser <ParserT> const & subject) const
     286       operator[](parser <ParserT> const & subject_) const
    287287       {
    288288           typedef typename impl::loop_traits<ParserT, MinT, MaxT>::type ret_t;
    289289           return ret_t(
    290                 subject.derived(),
     290                subject_.derived(),
    291291                m_min,
    292292                m_max);
    293293       }