Opened 10 years ago

Last modified 6 years ago

#2348 new Bugs

const qualified return value in iterator_facade

Reported by: brian.tyler@… Owned by: jeffrey.hellrung
Milestone: Boost 1.37.0 Component: iterator
Version: Boost 1.36.0 Severity: Cosmetic
Keywords: Cc:

Description

This is a very minor thing:

The line:

boost::indirect_iterator<const int* const *> it;

creating a iterator for constant iteration through a container of constant pointers creates a warning

"boost/iterator/iterator_facade.hpp:653: warning: type qualifiers ignored on function return type"

obviously this is not the way to fix it, but changing this line to typename remove_const<typename boost::detail::operator_brackets_result<Derived,Value,reference>::type>::type solves the problem.

Change History (2)

comment:1 Changed 10 years ago by Marshall Clow

Component: Noneiterator
Owner: set to Dave Abrahams

comment:2 Changed 6 years ago by Dave Abrahams

Owner: changed from Dave Abrahams to jeffrey.hellrung
Note: See TracTickets for help on using tickets.