
17 Apr
2004
17 Apr
'04
10:28 a.m.
Andrea Torsello wrote:
template<class U> enable_if_different<Tp, U, X<Tp>&> operator = (X<U> const &);
where enable_if_different<Tp, U, X<Tp>&> converts to X<Tp>&, but then it would interfere with template type deduction when passing the result to a templated function.
No it wouldn't. It would be written: template<class U> typename enable_if_different<Tp, U, X<Tp>&>::type operator = (X<U> const &); -- Daniel Wallin