copying const struct

Maxim Fomin maxim at maxim-fomin.ru
Mon Oct 14 07:19:24 PDT 2013


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.


More information about the Digitalmars-d-learn mailing list