
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