Opened 14 years ago

Last modified 10 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 by Marshall Clow, 14 years ago

Component: Noneiterator
Owner: set to Dave Abrahams

comment:2 by Dave Abrahams, 10 years ago

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