|
Boost : |
Subject: Re: [boost] [poly_collection] Request for comments: fast polymorphic collections
From: Vinnie Falco (vinnie.falco_at_[hidden])
Date: 2016-11-06 09:46:01
On Sun, Nov 6, 2016 at 7:25 AM, Joaquin M López Muñoz
<joaquinlopezmunoz_at_[hidden]> wrote:
> and I'd be very grateful if people could give their opinion on usefulness,
> design, etc.
> so as to determine potential interest in an eventual official submission to
I spent about 20 minutes reading the documentation and looking through
the class declarations in the repository. This library solves a real
problem and looks like it does so efficiently. The code looks pretty
solid. I can already think of one place that could benefit from such a
container. Specifically the implementation of this specification,
where "Condition" is a polymorphic object and where threshold
condition types may have an array of children which are themselves
Condition objects:
https://tools.ietf.org/html/draft-thomas-crypto-conditions-00
One question, how do you iterate over all the objects of a particular
type in a container using a range-for? I see begin() and end()
overloads which take a std::type index but if I want to visit all the
"warrior" objects (from your example) in a given container `c`, what
expression do I put in place of R below:
for(auto& sprite : R)
{
...
}
Thanks
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk