Subject: Re: [boost] Formal Review Request: TypeErasure
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2012-06-15 15:21:51
On 06/13/2012 01:46 PM, Karsten Ahnert wrote:
> On 05/22/2012 10:34 PM, Steven Watanabe wrote:
>> I'd like to request a formal review of the
>> TypeErasure library that I've posted about
>> several times before here.
> I am not sure if this has already been a topic here, but I wonder if the
> any type can be default constructible? The docs state that this is
> possible via type_erase::constructible< _self() >, but it is not
> working, at least for me.
What do you want the default constructor to do?
constructible<_self()> captures the default
constructor of the stored type. However, it
doesn't map to a default constructor of any<>
because there would be no way to know what the
contained type is.
typedef mpl::vector<..., constructible<_self()> > Concept;
y contains a default constructed instance of T.
Now, as far as having a default constructor that
sets the any to a null state goes, I intended
to implement it, but forgot about it. I should
have it in before the review, though.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk