
7 Jan
2005
7 Jan
'05
11:37 a.m.
Agoston Bejo writes:
Hello,
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>".
Use overload resolution. The easiest way would probably be to take 'is_convertible' implementation for your compiler and replace the overload used to detect 'To' type convertibility with with a function temlate accepting 'A<T1>'. HTH, -- Aleksey Gurtovoy MetaCommunications Engineering