Boost logo

Boost :

From: Marco (mrcekets_at_[hidden])
Date: 2007-10-11 07:33:25

On Wed, 10 Oct 2007 08:24:08 +0200, Johan Nilsson
<r.johan.nilsson_at_[hidden]> wrote:

> Michael Fawcett wrote:
>> On 10/9/07, Dean Michael Berris <mikhailberis_at_[hidden]> wrote:
>>> I thought about this, and the only problem is that it assumes that
>>> 'include' does not replace the already existing mapping between a
>>> function signature and the actual function being 'included'.
> I'll persist (yes, yes ... the imfamous bicycle shed): What's wrong with
> add:
> functions.add(&foo);
> functions.add(&foo); // Throws
> functions.insert(&foo); // Returns false
> functions.replace(&foo); // Overwrites if exists, inserts if not
> The above is based on the fact that only one overload of each signature
> is
> stored - analogous to method overloads.
> If some kind of multiple dispatch is desired - how about
> "multi_overloads"
> (compare set/multiset, map/multimap).
> / Johan

Well, my point of view is that you shouldn't see the proposed
as a container but just as an extension of Boost.Function.
It would be overkilling if Boost.Function had method like "insert" and
instead of a simple operator= , and, IMO, the same it's true for the
overload implementation.


Using Opera's revolutionary e-mail client:

Boost list run by bdawes at, gregod at, cpdaniel at, john at