Re: [Boost-bugs] [Boost C++ Libraries] #11488: flat_map and value_type

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #11488: flat_map and value_type
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-04-13 15:29:17


#11488: flat_map and value_type
-------------------------------+------------------------
  Reporter: gast128@… | Owner: igaztanaga
      Type: Bugs | Status: closed
 Milestone: To Be Determined | Component: container
   Version: Boost 1.57.0 | Severity: Problem
Resolution: invalid | Keywords:
-------------------------------+------------------------

Comment (by gast128@…):

 Ok I have to work around this then, e.g. the following code will not
 compile when fed with a flat_map const_iterator:

 {{{#!cpp

 template <typename Iterator>
 struct key_iterator : public
 boost::bidirectional_iterator_helper<key_iterator<Iterator>, typename
 std::iterator_traits<Iterator>::value_type::first_type>
 {
    typedef typename base::value_type value_type;


     value_type& operator* () const
     {
         return m_it->first;
     }

 private:
     Iterator m_it;
 };

 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11488#comment:2>
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-04-13 15:32:28 UTC