Boost logo

Boost :

Subject: Re: [boost] RFC: type erasure
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2011-05-23 20:37:03


AMDG

On 05/23/2011 02:34 PM, Vicente Botet wrote:
> I would try to study more deeply your design in order to see the advantage
> it could provide to my library. While developing Boost.Opaque (available on
> the sandbox
> https://svn.boost.org/svn/boost/sandbox/opaque/libs/opaque/doc/html/index.html),
> I was confronted to a similar problem, that is, how to add in a declarative
> way, more operations to the underlying class. I have reached to manage with
> this using what I have called a meta-mixin.
>
> A MetaMixin is a meta-function having as nested type a Mixin. The archetype
> of a MetaMixin is
>
> struct MetaMixinArchetype {
> template (*typename Final, typename Base*)
> struct type : Base
> {
> ...
> };
> };
>
> Metamixins are is a similar way to your concepts, passing them in a
> mpl-sequence.
>
> I will appreciate a lot if you can take a look and comment the design of
> Boost.Opaque.
>

It looks like your MetaMixin is pretty much
equivalent to what I did with concept_interface.
For what you're trying to do, I don't see that it
can really be improved much.

I'd say that for the most part, you're better
off without the extra complexity in my design.
I have to generate both the interface and the
dispatching code from a single specification.
You only need to define forwarding functions.

In Christ,
Steven Watanabe




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