Boost logo

Boost :

From: Erdei, András (ccg_at_[hidden])
Date: 2000-10-11 10:45:27

> > and & (i++) will not
> > produce what you expect --
> This could be fixed with yet another overload to forward the request. And
> could add operator*() and operator->()....of course this all requires the
> usual gamut of type deduction templates....

<earlier posting>
> I suppose a member template converter would make a bigger mess of things
> as well right? (ambiguous conversions etc.) (Or it won't be even called
> because of rule #1?)

> class proxy {
> public:
> template<class S>
> operator S () { return S(real) ; } // makes the copy.
> ...
> };

  Can you explain these in more detail? (I'm interested
in this proxy technique for other reasons (thread-safe



> that either the return value was used or not and then do the smart

  If you mean to optimize away the temporaries
in the original ++, i guess it isn't allowed
to -- the ctor & dtor may have side-effects
(like the dtor of the proxy).

Boost list run by bdawes at, gregod at, cpdaniel at, john at