[Boost-bugs] [Boost C++ Libraries] #2348: const qualified return value in iterator_facade

Subject: [Boost-bugs] [Boost C++ Libraries] #2348: const qualified return value in iterator_facade
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-09-19 17:09:15


#2348: const qualified return value in iterator_facade
-----------------------------------+----------------------------------------
 Reporter: brian.tyler_at_[hidden] | Type: Bugs
   Status: new | Milestone: Boost 1.37.0
Component: None | Version: Boost 1.36.0
 Severity: Cosmetic | Keywords:
-----------------------------------+----------------------------------------
 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.

-- 
Ticket URL: <http://svn.boost.org/trac/boost/ticket/2348>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:58 UTC