Re: [boost] Vector with compile-time polymorphism
Yes, I guess it is very similar (if not the same) to polly_collection, or
more specifically to: boost::any_collection.
Is there a data structure that is similar to polly_collection but can be
sorted?
On Fri, Apr 9, 2021 at 2:47 PM Ivica B via Boost
multivector
mvect; Each type is held in a separate std::vector for that type. So in the above case, multivector consists of three std::vectors: std::vector<rectangle>, std::vector<circle> and std::vector<triangle>.
Sounds a bit like https://www.boost.org/doc/libs/1_75_0/doc/html/poly_collection.html no? --DD
W dniu 11.04.2021 o 18:34, Ivica B via Boost pisze:
Yes, I guess it is very similar (if not the same) to polly_collection, or more specifically to: boost::any_collection.
Is there a data structure that is similar to polly_collection but can be sorted?
On Fri, Apr 9, 2021 at 2:47 PM Ivica B via Boost
wrote: multivector
mvect; Each type is held in a separate std::vector for that type. So in the above case, multivector consists of three std::vectors: std::vector<rectangle>, std::vector<circle> and std::vector<triangle>. Sounds a bit like https://www.boost.org/doc/libs/1_75_0/doc/html/poly_collection.html no? --DD
Some time ago I was playing with something related, i.e. tuple_vector. A container holding tuple elements in separate containers and proving access through proxy references, tuples of refecences. AFAIU it's not exactly what you're talking about but it's in the same "class" of containers benefiting from data locality. https://github.com/awulkiew/test-tuple_vector Adam
participants (2)
-
Adam Wulkiewicz
-
Ivica B