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-12 03:25:41


On 8/12/2011 2:50 PM, Eric Niebler wrote:
> On 8/11/2011 10:26 PM, Joel de Guzman wrote:
>> I reverted to the original implementation but used advance<begin,
>> size-1> instead of prior. pop_back_iterator is an unwieldy hack and
>> while it might be fixable, I am not sure if its CT cost outweigh the
>> CT cost of simply using advance<begin, size-1>.
>
> Yowsa! That instantiates O(N) templates for what should be an O(1)
> operation. I say leave it as prior until we can think of something better.

Yeah, you are right. Reverted for now. Alas, the tests will fail,
but anyway, I think I know a good strategy to make it work.

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