bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RFC: c++: provide control over the stack.hh file name


From: Hans Åberg
Subject: Re: RFC: c++: provide control over the stack.hh file name
Date: Fri, 28 Sep 2018 10:35:31 +0200

> On 28 Sep 2018, at 07:06, Akim Demaille <address@hidden> wrote:
> 
>> BTW, I just noticed a naming conflict (yeah, aren't name hierarchies
>> great to prevent this ;). In another change I made (unrelated to my
>> main changes, but in order to allow using another container such as
>> deque, as suggested by Hans Åberg) I used:
>> 
>> %define api.stack.include deque
>> %define api.stack.container {std::deque}
>> 
>> Of course, this can be changed (if you want to include this patch at
>> all — I don't care either way).
> 
> Do you think it’s useful?  We used to use deques in the generated
> parser, but in 
> http://lists.gnu.org/archive/html/bison-patches/2013-01/msg00010.html
> we moved to vector because I don’t see what it buys us.  Sure, it
> saves us from occasional copies when the vector grows, but that’s
> all.  At the cost of more indirections.

For types that can't be copied or moved, or does not have move, the deque might 
be desirable. Don't know about that in this context, but a search shows that 
such things are out there.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]