Boost logo

Boost :

Subject: Re: [boost] [fusion] pop_back doesn't work on fwd sequences
From: Eric Niebler (eric_at_[hidden])
Date: 2011-08-10 15:40:49


On 8/10/2011 11:18 AM, Joel de Guzman wrote:
> That example of yours [ push_back(nil(), 1) ] can also be made to
> work by making 'nil' random-access. In essence, we should give all
> sequences the highest potential traversal category that we can.

OK, let's pick a different example:

  fusion::list<int> l(1);
  fusion::pop_back(fusion::push_back(l, 42));

Although technically this works today, it's just a curiosity due to the
way joint_view iterators work. list is fwd, so according to your scheme
so too would be push_back(l, 42), and so we couldn't legally call
pop_back on it.

-- 
Eric Niebler
BoostPro Computing
http://www.boostpro.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk