Boost logo

Boost :

Subject: Re: [boost] [type_erasure] Review started (July 18-27, 2012), rebind_any bad_cast
From: Larry Evans (cppljevans_at_[hidden])
Date: 2012-07-25 19:00:15


On 07/25/12 14:16, Larry Evans wrote:
> On 07/25/12 13:33, Steven Watanabe wrote:
>> AMDG
>>
>> On 07/25/2012 09:36 AM, Larry Evans wrote:
>>>
>>> However, the doc:
>>>
>>> http://steven_watanabe.users.sourceforge.net/type_erasure/libs/type_erasure/doc/html/boost/type_erasure/rebind_any.html
>>>
>>> was a bit confusing since it says:
>>>
>>> A metafunction that returns any type corresponding to a placeholder.
>>
>>
>> I've modified this to say
>>
>> "A metafunction that changes the placeholder of an any"
>>
>> Is that clearer?
>>
>
> Sorry, no. How does it change the placeholder. Hmmm, do you mean
> the return type(i.e. rebind_any<any<C,S>,T>::type) is any<C,T>?

Yes, based on output of the attached:

./rebind_any.exe
any_self_t=boost::type_erasure::any<boost::mpl::vector<boost::type_erasure::copy_constructible<boost::type_erasure::_self>,
boost::type_erasure::typeid_<boost::type_erasure::_self>,
boost::type_erasure::addable<boost::type_erasure::_self,
boost::type_erasure::_self, boost::type_erasure::_self>, mpl_::na,
mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na,
mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na,
mpl_::na, mpl_::na>, boost::type_erasure::_self>
rebind_self2a_t=boost::type_erasure::any<boost::mpl::vector<boost::type_erasure::copy_constructible<boost::type_erasure::_self>,
boost::type_erasure::typeid_<boost::type_erasure::_self>,
boost::type_erasure::addable<boost::type_erasure::_self,
boost::type_erasure::_self, boost::type_erasure::_self>, mpl_::na,
mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na,
mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na,
mpl_::na, mpl_::na>, boost::type_erasure::_a>

However, again, it uses my demangled_type_name function :(




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