
On Fri, Aug 5, 2011 at 5:32 PM, Phil Endecott < spam_from_boost_dev@chezphil.org> wrote:
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?
Maybe consider the flat_* interface factored out into a family of free functions applicable to any...ummm..."extensible" (e.g., has some kind of push_back functionality, etc.?) range? Just a quick thought. - Jeff