Boost logo

Boost :

Subject: Re: [boost] Formal Review Request: TypeErasure
From: lcaminiti (lorcaminiti_at_[hidden])
Date: 2012-05-23 22:12:54

Steven Watanabe-4 wrote
> I'd like to request a formal review of the
> TypeErasure library that I've posted about
> several times before here.
> The TypeErasure library is a generalization
> of boost::any and boost::function. It
> allows easy composition of arbitrary
> type erased operators.
> As an example of basic usage, we
> can simulate Boost.Any:
> any&lt;mpl::vector&lt;copy_constructible&lt;&gt;, typeid_<> > > x(10);
> int i = any_cast<int>(x); // i == 10
> The library is available in the Boost Sandbox at
> You can download archives with pre-built documentation from
> Online documentation can be found here:

Hello Steven,

I quickly read the docs (see a couple of minor comments below). I'll compile
and play with the examples this weekend.

I'm interested in the library. If you are looking for a Review Manager, I'd
like to volunteer if that's OK with you and the Review Wizards.

Minor Comments

1) It'd be nice to have a motivating example up front (something not trivial
but not as complex as the range formatter either).

2) Why placeholders _a, _b, ... instead of _1, _2, ...?

3) I found the syntax of concept_interface difficult to understand... for
example, Base looks arbitrary. But then it's very nice to be able to
c.push_back(10) instead of call(...)

4) Same for overloaded concept_interface where both Base and Enable look
arbitrary. (I wonder if macros could generate some of the boiler-plate code
for the overload.)

5) There's a FIXME in the Reserved Identifier section.


View this message in context:
Sent from the Boost - Dev mailing list archive at

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