Boost logo

Boost :

From: Andrei Alexandrescu (andrewalex_at_[hidden])
Date: 2002-10-11 10:30:58


"Daniel Frey" <daniel.frey_at_[hidden]> wrote in message
news:3DA6940A.B539F8BD_at_aixigo.de...
>This sounds very promising and I'd love to review it and help you<

OT: Thank you for your offer. Please send me email so I can archive it.
Thanks.

> vector<string>& v = Fun();

> is also legal (12.2/5), but I think most people don't know about that
and even fear misuse by beginners...<

No it's not. You can only bind a temporary to a const reference.

> const T operator+(const T& lhs, const T& rhs)
> {
> T copy(lhs);
> return copy += rhs;
> }

> This is completly wrong, as I already said multiple times. See
operators_1_28_0.patch.gz in the boost files section and search the
mailing list for the corresponding discussion. <

Yeah, thanks for letting me sift through ALL the Boost mailing archive
looking for your name, and to decrypt a .patch file :o).

For those less inclined to do so, here's a relevant link:

http://lists.boost.org/MailArchives/boost/msg31458.php

and here's the patch (for cvs junkies only):

http://groups.yahoo.com/group/boost/files/operators_1_28_0.patch.gz

So your implementation dispatches two two variants, depending on
BOOST_NO_NRVO. I have two pieces of good news: (1) Zuto is one order of
magnitude smaller and simpler than what I saw in the patch; (2) Zuto works
with ALL compilers, guaranteed, regardless whether the compilers do NRVO or
not.

Andrei

--
All new!  THE C++ Seminar: Oct. 28-30 in Vancouver, WA.
http://www.thecppseminar.com/

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