Boost logo

Boost :

Subject: Re: [boost] [Container] Provide more guarantees for flat_multimap
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2014-08-21 08:29:22


On 19 Aug 2014 at 15:27, Rob Stewart wrote:

> >Pre-C++11 I would agree. However availability of variadic args makes
> >putting tags at the end harder than at the start. For me personally
> >in my own code, I would prefer all tags to go at the front rather
> >than some at the start and some at the end.
> >
> >Ok, I'm being lazy, but it saves productivity in having to write
> >Args&&... filters just to put tags at the end.
>
> I put non-const reference parameters (for "out" arguments) first because
> of defaults, so it's the same idea. Putting the tag first is a bit
> jarring at first, but I like your argument.

I ended up backing out the tagged noalloc insert() dispatch, and now
it's plain old insert_noalloc().

Why? Because if you tag dispatch insert(node_ptr), then you start
thinking you really ought to add noalloc overloads for all the
modifying functions. Which maybe you should, but then one is
deviating quite far from what I originally intended which is merely
that some functional noalloc mechanism should be available for those
rare users wanting such a thing, not that it is being endorsed for
all use cases and raising my maintenance burden.

Anyway, for those interested, my concurrent_unordered_map is now 90%
functionally tested and many bugs have been found and fixed. I move
onto exception safety unit testing next, and for which I shall need
to write an allocator which can be made to throw at exactly the right
point within the map's implementation. I expect that will take
another week at least as this Saturday my day is full of other tasks.

WiP code lives at https://github.com/ned14/boost.spinlock.

Niall

-- 
ned Productions Limited Consulting
http://www.nedproductions.biz/ 
http://ie.linkedin.com/in/nialldouglas/



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