Boost logo

Boost Users :

From: Vyacheslav E. Andrejev (vandrejev_at_[hidden])
Date: 2005-02-04 04:49:37


Hello Aleksey,

Thank you for reply. Your suggestion looks much more attractive than code
I have already implemented. But, yes, unfortunatly, there is still named
auxiliary template. Anyway thanks, because by means of MPL I could write
curious engine that takes mpl vector of types and builds runtime graph of
available conversions between these types. The engine allows to find a chain
of conversions that we have to make in order to convert any type to any if
this conversion is somehow possible.

Regards.

-- 
Vyacheslav E. Andrejev
System Architect, Excelsior, LLC
AG> Or
AG> 
AG> template< typename T > struct WhoConverted
AG> : boost::mpl::transform<
AG> types
AG> , boost::is_convertible<T, boost::mpl::_1>
AG> {
AG> };
AG> 
AG> It's inconvenient to have to write (and name) an auxiliary template
AG> that has no other uses, yes.
AG> 
AG> At the moment, the above is the best you can have. I'm considering
AG> implementing lambda scoping along the lines of
AG> http://article.gmane.org/gmane.comp.lib.boost.devel/116000 for the
AG> next release.
AG> 
AG> HTH and sorry for the late reply,
AG> 

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net