Boost logo

Boost :

From: Giovanni Bajo (giovannibajo_at_[hidden])
Date: 2004-04-18 05:22:18


Miro Jurisic wrote:

> Inside iterator_facade, I had to change:
>
> Derived const& derived() const
> {
> return static_cast<Derived const&>(*this);
> }
>
>
> to
> Derived const& derived() const
> {
> return *static_cast<Derived const*>(this);
> }
>
> Without that change, CW gives a warning saying that the function
> returns a reference to an automatic variable. I am pretty sure the
> warning is wrong, but this change silenced it, and I don't have the
> time to read over the spec to find out if the warning is correct or
> not.

This is a known bug in CodeWarrior:
http://lists.boost.org/MailArchives/boost/msg57316.php

It's a miscompilation bug, and in CW8 you don't even get a warning. I strongly
suggest the code to be changed. Dave?

-- 
Giovanni Bajo

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