Boost logo

Boost :

Subject: Re: [boost] [fusion] pop_back doesn't work on fwd sequences
From: Joel de Guzman (joel_at_[hidden])
Date: 2011-08-10 18:06:42


On 8/11/2011 4:04 AM, Joel de Guzman wrote:

> Hmmmm. now that I think about it, it is also possible to change the
> implementation of pop_back to make it so that it would not need
> to use 'prior'. The end iterator can be abstracted such that it
> compares equal to i through next(i). I'll see if that works out.

Yep. It works like a charm. I have a fix. Now this works:

    {
        list<int, int> l(1, 2);
        std::cout << pop_back(l) << std::endl;
        BOOST_TEST((pop_back(l) == make_list(1)));
    }

Now, indeed, the docs works as advertized.

Thanks for your nudging, Eric. I truly appreciate it. You get my
neurons humming. Committed to trunk. I'd welcome a quick review
before I make this official.

Regards,

-- 
Joel de Guzman
http://www.boostpro.com
http://boost-spirit.com

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