Boost logo

Boost :

Subject: [boost] [Containers] Should flat_* expose implementation vector?
From: Phil Endecott (spam_from_boost_dev_at_[hidden])
Date: 2011-08-05 20:32:29


Dear All,

Should Ion's proposed flat_set, flat_map etc. expose the underlying
vector that they use as their implementation?

Pros: it lets the user efficiently load and save the content, and
implement algorithms that cannot be done via the flat_* interface.

Cons: it lets the user break the invariants.

Const access to the impl is another possibility.

Related to that: could the implementation type be a template
parameter? Example: could one implement a flat_set on top of a
stable_vector? (Is that useful?) And/or: should flat_* actually be
adaptors that take a reference to their underlying implementation?

Regards, Phil.


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