Boost Users :
Subject: Re: [Boost-users] [Q] using boost operators return types
From: Alan M. Carroll (amc_at_[hidden])
Date: 2009-03-23 14:59:29
At 11:54 AM 3/23/2009, V S P wrote:
>for example, the doc says
>produces T operator-(const T&, const T&)
>T temp(t); temp -= t1.
>so does this mean
>T& operator -= (const T& ) ?
It means that T must have
1) A public (possibly explicit) copy constructor ("T temp(t)")
2) A public operator -= that takes an argument convertible from T. ("temp -= t1").
T& T::operator -= (T const&) would satisfy this criteria, but it is not the only way.
I ignored your other question because of your request to do so.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net