copying const struct

Benjamin Thaut code at benjamin-thaut.de
Mon Oct 14 07:29:59 PDT 2013


Am 14.10.2013 16:19, schrieb Maxim Fomin:
> On Monday, 14 October 2013 at 13:56:58 UTC, Benjamin Thaut wrote:
>> Am 14.10.2013 13:54, schrieb Dicebot:
>>> On Monday, 14 October 2013 at 11:45:30 UTC, Jack Applegame wrote:
>>>> On Monday, 14 October 2013 at 11:38:23 UTC, Benjamin Thaut wrote:
>>>>> The line "Bar2 b2 = bar2;" would remove const from "member"
>>>> Seems strange, because b2.member is const by declaration.
>>>
>>> Strange indeed and smells like a bug. `auto bar = Bar2(bar2.member)`
>>> works so it should be assignable.
>>
>> d.puremagic.com/issues/show_bug.cgi?id=9665
>
> I don't see how this is related to the topic.

I thought maybe its related to this bug.


More information about the Digitalmars-d-learn mailing list