Boost logo

Boost Users :

Subject: [Boost-users] [Q] using boost operators return types
From: V S P (toreason_at_[hidden])
Date: 2009-03-23 10:55:50


I am working on a
cmoney_t class using decNumber package (ICU license).
IBM has decNumber++ class but that one is for commercial use, so I
cannot use it.

I am using this example
http://www.boost.org/doc/libs/1_38_0/libs/utility/operators.htm#example

but cannot understand
why object is returned from those operators and not an object reference

second, I do not quite understand, what exactly is a set of
'automatically generated' operators and would I figure that out.

I just want a minimum set of operators that implement typical operations
with money (I am using decQuad underlying implementation).

thanks in advance,
Vlad

On Mon, 23 Mar 2009 14:24 +0100, "Thorsten Ottosen"
<thorsten.ottosen_at_[hidden]> wrote:
> Steven Watanabe skrev:
> > AMDG
> >
> > Archie14 wrote:
> >> ptr_vector<A> lst;
> >>
> >> When I need to erase element from this container - should I just do A*
> >> el;
> >> iterator it = std::find (lst.begin(), lst.end(), el);
> >> lst.erase(it);
> >>
>
> Replace "A* el" with "A el". Objects are compared not by their pointer
> value, but by the paointee.
>
> -Thorsten
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users

-- 
  V S P
  toreason_at_[hidden]
-- 
http://www.fastmail.fm - mmm... Fastmail...

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