Re: [Boost-bugs] [Boost C++ Libraries] #6714: utree::insert return begin() if position == end()

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #6714: utree::insert return begin() if position == end()
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-03-20 14:04:42


#6714: utree::insert return begin() if position == end()
--------------------------------+-------------------------------------------
  Reporter: sairony@… | Owner: djowel
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: spirit
   Version: Boost 1.48.0 | Severity: Problem
Resolution: | Keywords:
--------------------------------+-------------------------------------------

Comment (by anonymous):

 That does not seem to be the case. The following fails for me:

 {{{
 #include "boost/spirit/home/support/utree.hpp"
 #include <cassert>
 int main()
 {
         boost::spirit::utree ut;
         ut.push_back(1);
         assert( ut.insert( ut.end(), 1 ) != ut.begin() );
 }
 }}}

 If one takes a look at boost::utree::end() it creates an iterator with 0
 as node ( makes sense I presume ). The guard is then:
 {{{
 if (!pos.node)
 {
         l.push_back(val);
         return utree::iterator(l.first, 0); // begin();
 }
 }}}
 As pos.node == 0 for all end() it would seem it doesn't matter how many
 items are in the utree. Perhaps I'm missing something?

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6714#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-02-16 18:50:09 UTC