Return const object through mutable Object
Jacob Carlborg
doob at me.com
Sun Apr 15 23:20:06 PDT 2012
On 2012-04-16 02:33, Jonathan M Davis wrote:
> It definitely looks like a bug. Whether it returns Foo or Object should have no
> effect on constness, and since f is a member variable of Foo, and the this
> pointer/reference is const, bar is going to have to return a const reference
> to it, which the second version isn't doing.
>
> - Jonathan M Davis
This is what I expected. I've reported a bug:
http://d.puremagic.com/issues/show_bug.cgi?id=7920
--
/Jacob Carlborg
More information about the Digitalmars-d-learn
mailing list