Iterators: harmless (but annoying) warnings in filter_iterator

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Iterators: harmless (but annoying) warnings in filter_iterator

Roman Neuhauser
My CFLAGS provoke two instances of the "'x' shadows a member 'this'"
warning in filter_iterator constructors.  Although the code is ok, I'd
still like to ask for a change so that I may return to using -Werror
without tinkering with the installed boost. :)

/usr/local/include/boost/iterator/filter_iterator.hpp: In constructor `boost::filter_iterator<Predicate, Iterator>::filter_iterator(Predicate, Iterator, Iterator)':
/usr/local/include/boost/iterator/filter_iterator.hpp:57: warning: declaration of 'end' shadows a member of 'this'
/usr/local/include/boost/iterator/filter_iterator.hpp: In constructor `boost::filter_iterator<Predicate, Iterator>::filter_iterator(Iterator, Iterator)':
/usr/local/include/boost/iterator/filter_iterator.hpp:63: warning: declaration of 'end' shadows a member of 'this'

So long, and thanks for all the software!

--
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE.             http://bash.org/?255991
_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Iterators: harmless (but annoying) warnings in filter_iterator

David Abrahams
Roman Neuhauser <[hidden email]> writes:

> My CFLAGS provoke two instances of the "'x' shadows a member 'this'"
> warning in filter_iterator constructors.  Although the code is ok, I'd
> still like to ask for a change so that I may return to using -Werror
> without tinkering with the installed boost. :)
>
> /usr/local/include/boost/iterator/filter_iterator.hpp: In constructor `boost::filter_iterator<Predicate, Iterator>::filter_iterator(Predicate, Iterator, Iterator)':
> /usr/local/include/boost/iterator/filter_iterator.hpp:57: warning: declaration of 'end' shadows a member of 'this'
> /usr/local/include/boost/iterator/filter_iterator.hpp: In constructor `boost::filter_iterator<Predicate, Iterator>::filter_iterator(Iterator, Iterator)':
> /usr/local/include/boost/iterator/filter_iterator.hpp:63: warning: declaration of 'end' shadows a member of 'this'
>
> So long, and thanks for all the software!

Patched on the HEAD and RC_1_34_0

Thanks for the report!

--
Dave Abrahams
Boost Consulting
www.boost-consulting.com

_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Program_options: -Wshadow warnings [was: Re: Iterators: harmless (but annoying) warnings in filter_iterator]

Roman Neuhauser
# [hidden email] / 2006-04-16 14:06:56 -0400:

> Roman Neuhauser <[hidden email]> writes:
>
> > My CFLAGS provoke two instances of the "'x' shadows a member 'this'"
> > warning in filter_iterator constructors.  Although the code is ok, I'd
> > still like to ask for a change so that I may return to using -Werror
> > without tinkering with the installed boost. :)
>
> Patched on the HEAD and RC_1_34_0
>
> Thanks for the report!

    *Thank you* for the fix. If you're interested in more of these warnings,
    I just wanted to try out Boost.Program_options, and got this (there maybe
    more, this comes from a small snippet taken from the library tutorial):

    boost/lexical_cast.hpp:49: warning: declaration of 'target_type' shadows a member of 'this'
    boost/lexical_cast.hpp:49: warning: declaration of 'source_type' shadows a member of 'this'

    boost/program_options/detail/parsers.hpp:31: warning: declaration of 'args' shadows a member of 'this'
    boost/program_options/detail/parsers.hpp:66: warning: declaration of 'style' shadows a member of 'this'
    boost/program_options/errors.hpp:23: warning: declaration of 'what' shadows a member of 'this'
    boost/program_options/errors.hpp:29: warning: declaration of 'msg' shadows a member of 'this'
    boost/program_options/errors.hpp:29: warning: declaration of 'tokens' shadows a member of 'this'
    boost/program_options/errors.hpp:54: warning: declaration of 'alternatives' shadows a member of 'this'
    boost/program_options/errors.hpp:68: warning: declaration of 'what' shadows a member of 'this'
    boost/program_options/errors.hpp:76: warning: declaration of 'what' shadows a member of 'this'
    boost/program_options/errors.hpp:82: warning: declaration of 'what' shadows a member of 'this'
    boost/program_options/errors.hpp:106: warning: declaration of 'what' shadows a member of 'this'
    boost/program_options/errors.hpp:113: warning: declaration of 'what' shadows a member of 'this'
    boost/program_options/option.hpp:29: warning: declaration of 'value' shadows a member of 'this'
    boost/program_options/option.hpp:29: warning: declaration of 'string_key' shadows a member of 'this'
    boost/program_options/options_description.hpp:235: warning: declaration of 'what' shadows a member of 'this'
    boost/program_options/parsers.hpp:35: warning: declaration of 'description' shadows a member of 'this'
    boost/program_options/variables_map.hpp:34: warning: declaration of 'defaulted' shadows a member of 'this'
    boost/program_options/variables_map.hpp:34: warning: declaration of 'v' shadows a member of 'this'

--
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE.             http://bash.org/?255991
_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users