Boost logo

Boost :

Subject: Re: [boost] [metal] Feature Complete - Request for Feedback
From: Peter Dimov (lists_at_[hidden])
Date: 2017-02-21 23:38:05


Bruno Dutra wrote:
>>> mp_transform<std::add_const_t, std::shared_ptr<X>> // std::shared_ptr<X
>>> const>

> Your example is implemented in Metal like this
>
> using _ = metal::transform<metal::lambda<std::add_const_t>,
> metal::as_list<std::shared_ptr<X>>>; // metal::list<X const>
> metal::apply<metal::lambda<std::shared_ptr>, _> // std::shared_ptr<X
> const>

And suppose that std::shared_ptr<X> is given to you as a type P, and you
don't know if it's shared_ptr or not, so you can't use
metal::lambda<std::shared_ptr>?


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