Boost logo

Boost :

From: Daniel Wallin (dalwan01_at_[hidden])
Date: 2004-04-17 05:28:55


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

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk