
7 Jan
2005
7 Jan
'05
2:37 p.m.
Aleksey Gurtovoy wrote:
In his case, 'to' is an unbound family of types ('A<X>' for any 'X'), so 'is_convertible' won't do it. May be we should consider getting this in the library, in some form. E.g. tweak 'is_convertible' to support something like
is_convertible<from, A<_> >
Or something like exists<_1, /* such that */ is_convertible<from, A<_1> > ;//-) Quite often, I suppose, is enough to specify a sequence of candidate types and then call mpl::find_if<candidates, is_convertible<from, A<_> > > (It would be very funny to generalize mpl sequence concept to support infinite sequences of unknown elements to cover this case :-))) -- Alexander Nasonov