Boost logo

Boost :

From: Raoul Gough (RaoulGough_at_[hidden])
Date: 2004-02-09 14:16:22


David Abrahams <dave_at_[hidden]> writes:

> Brian McNamara <lorgon_at_[hidden]> writes:
>
[snip]
>> I am trying to find the 'hard' cases where the
>> compiler might not be able to easily make the temporary have the right
>> 'lifetime', and thus require an extra copy.
>
> I don't see any problem here. There's no problem getting the rvalue
> out of source(), or sink(source()) would fail. Furthermore, no
> compiler I've ever seen will actually make the allowed temporary in
> that case.

FWIW, I think at least one version of the IBM Visual Age compiler
disallows bindings to a noncopyable rvalue, possibly because it
actually wants to create a temporary. All compilers *should* issue a
diagnostic anyway, whether they actually need the temporary or not.

See e.g. "Problem with struct wrapstrstream":

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

BTW, has anyone else noticed that all of Google's links to the boost
mail archive are wrong at the moment? It looks like the messages have
all been renumbered at some stage, invalidating all previous URLs
(e.g. Google thinks the above message is at
http://lists.boost.org/MailArchives/boost/msg09814.php). I got the
up-to-date link from AltaVista.

-- 
Raoul Gough.
export LESS='-X'

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