20 Oct
2008
20 Oct
'08
4:14 p.m.
AMDG Peng Yu wrote:
template
struct multiply_traits; template
struct multiply_traits { typedef X<T1> result_type; };
The most reliable way to define multiply_traits in general is
template<class T>
T make();
template
Y
operator*(const Y<T1> &y, const T2 &t)
You need to use BOOST_TYPEOF_TPL. http://www.boost.org/doc/libs/1_36_0/doc/html/typeof/refe.html#typeof.typo. Some compilers can handle this (I just tried it on msvc 9.0), but I strongly advise using multiply_traits as defined above for portability. In Christ, Steven Watanabe