
7 Jan
2005
7 Jan
'05
11:39 a.m.
"John Maddock"
how do I express through template metaprogramming or in a similar way that a class is convertible to a template class for some T1? I.e., the condition: "There exists some T1 such that B is convertible to A<T1>". An example program: (Platform: VC++7.1)
I guess you want the type-trait: is_convertible
.
Oh, if only it were such easy! is_convertible cannot be used with template classes, as far as I know. This is what causes the problem. (A is a template class)
John.