Boost logo

Boost Users :

From: Joaquin M Lopez Munoz (joaquin_at_[hidden])
Date: 2007-09-21 15:26:49


Hello Ovanes,

Ovanes Markarian <om_boost <at> keywallet.com> writes:

>
> Hello Joaquín,I would like to make a proposal for additional feature of
> optionaly making multi-index container non-copyable (via copying policy
> class). The same way as a user can decide which indicies to use she/he
> could specify whether the new data-structure should be copyable or not.
> In my case I was assuming to pass container by reference, but it was
> copied by some function object. Which produced despite the performane
> issue wrong results. Using the non-copyable policy I would simply get a
> compiler error.

With all due respect, I don't think this is a feature
worth including into the lib because:

1. All standard containers are copyable, I don't see
any compelling reason to deviate from that.
2. The overlook you mention could have happened with almost
any other kind of object, having this particular type patched
makes little difference In the grand scheme of things.

Anyway, you can have your own noncopyable_multi_index_container
by simply deriving from multi_index_container and providing
the necessary forwading constructors (save copy, of course).
Maybe this is sufficient for your needs.

Best,

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net