Boost logo

Boost :

Subject: Re: [boost] [TypeErasure] Forward constructors and binded types
From: Larry Evans (cppljevans_at_[hidden])
Date: 2012-07-22 13:50:11

On 07/22/12 10:18, Markus Werle wrote:
> Fabio Fracassi wrote:
>> Just spelling out some thoughts I had while reading the docu:
>> Even though, it would help to have this information in the docu. The way
>> it is written now feels a bit like playing Jeopardy, you present
>> solutions and the reader tries to figure out the problem.
> I would like to add to this: I got the impression that TypeErasure is
> something really great to have - if and only if you really understand the
> problem it solves and how to solve it.
I've been trying to see the relation between type_erasure and some
design patterns. This link:

suggests a relationship between type erasure and the bridge pattern.
Since the bridge pattern is documented and the bridge pattern docs
show the type of problem it solves, maybe Steven could explain the
difference between the problem his type_erasure library solves
and the problem solved by the bridge pattern, and *maybe* that
would be some help.

AFAICT, the type_erasure library is also like the object adapter
pattern in that it contains a pointer to the adaptee in the
any::data member variable. However, unlike the adapter, there's
no virtual functions which the adaptee implements.

The type_erasure library is also like the bridge pattern in
that it hides the implementation of the abstraction.
AFAICT, the abstraction (using the bridge pattern term), in the
type_erasure library, is the any::table member.

Stephen, is that comparison anywhere close?


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