Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-07-26 10:12:55


"Stefan Slapeta" <stefan_at_[hidden]> writes:

>
>
>> -----Original Message-----
>> From: boost-bounces_at_[hidden]
>> [mailto:boost-bounces_at_[hidden]] On Behalf Of David Abrahams
>>
>> > This warning in the extract test case should also be
>> disabled for Intel 8:
>> >
>> > ..\libs\python\test\extract.cpp(59): warning #473:
>> returning reference
>> > to local temporary
>> > return extract<std::string const&>(x);
>> > ^
>>
>> Feel free.
>
> Should be done by somebody with a write access. Just increase the Intel
> version number in the code from 7 to 8.

Done.

>>
>> > BTW, is this a compiler defect?
>>
>> Yes.
>>
>
> I still don't see why? Aren't you (indirectly) returning a reference to a
> local object?
>
> std::string const& extract_string_cref(object x)
> {
> // [disable warnings]
> return extract<std::string const&>(x);
> // [enable warnings]
> }

No.

-- 
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com

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