ДОРОГИЕ ТОВАРИЩИ!
Такая проблема: надо во время компиляции узнать, можно ли явно преобразовать один тип в другой
template <class from, class to>
struct ExplicitConversion
{
enum{ exists = /*true, если можно сделать to(from)*/ };
};
SS>Такая проблема: надо во время компиляции узнать, можно ли явно преобразовать один тип в другой
::boost::is_convertible<T,U>::value
Evaluates to true if an imaginary lvalue of type T is convertible to type U.Type T must not be an incomplete type.
Type U must not be an incomplete, abstract or function type.
No types are considered to be convertible to an array type.
?
...
Это для неявного преобразования, требуется же для явного.