[Boost-bugs] [Boost C++ Libraries] #11481: zip_iterator issue with _GLIBCXX_DEBUG and std::vector::insert

Subject: [Boost-bugs] [Boost C++ Libraries] #11481: zip_iterator issue with _GLIBCXX_DEBUG and std::vector::insert
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-07-16 11:59:21


#11481: zip_iterator issue with _GLIBCXX_DEBUG and std::vector::insert
------------------------------------------+------------------------------
 Reporter: laurent.rineau__cgal_boost@… | Owner: jeffrey.hellrung
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: iterator
  Version: Boost 1.57.0 | Severity: Problem
 Keywords: |
------------------------------------------+------------------------------
 If one uses the `zip_iterator` class template with
 `std::vector::insert(It1, It2, It2)`, with `_GLIBCXX_DEBUG` defined, g++
 return a compilation error:
 {{{
 /usr/include/c++/4.9.2/debug/functions.h:220:69: error: invalid
 initialization of non-const reference of type ‘boost::tuples::cons<int&,
 boost::tuples::cons<int&, boost::tuples::null_type> >&’ from an rvalue of
 type
 â€˜boost::iterator_facade<boost::zip_iterator<boost::tuples::tuple<__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<int*,
 std::__cxx1998::vector<int, std::allocator<int> > >,
 std::__debug::vector<int> >,
 __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<int*,
 std::__cxx1998::vector<int, std::allocator<int> > >,
 std::__debug::vector<int> > > >, boost::tuples::cons<int&,
 boost::tuples::cons<int&, boost::tuples::null_type> >,
 boost::random_access_traversal_tag, boost::tuples::cons<int&,
 boost::tuples::cons<int&, boost::tuples::null_type> >, long
 int>::reference {aka boost::tuples::cons<int&, boost::tuples::cons<int&,
 boost::tuples::null_type> >}’
        return __foreign_iterator_aux4(__it, std::__addressof(*__other));
                                                                      ^

 }}}

 The attached test case `test.cpp` shows the error, with g++-4.9.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11481>
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:50:18 UTC