|
Boost : |
Subject: Re: [boost] [review] conversion - Kevlin's comments
From: Gordon Woodhull (gordon_at_[hidden])
Date: 2011-09-02 13:40:59
On Sep 1, 2011, at 1:43 PM, Vicente J. Botet Escriba wrote:
> Thanks Gordon for forwarding the Kevlin comments.
>
> Looking forward a simple and power library making easier conversions ;-)
If taking this further, I would just find or write a library capable of glueing together function/functor overloads. The overloads would still be
operator()(Source const&, type_tag<Target>)
and there would be some convenience class which defines member function
template<typename Target, typename Source>
Target cast(Source const&);
But of course I won't get around to it unless I find some other reason why I need such a thing! :-) Still hoping someone will chime in and say Phoenix (or Egg?) already does this. Jeff has suggested a plausible design using Eric's can_be_called in the other thread.
Cheers,
Gordon
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk