copying const struct

Dicebot public at dicebot.lv
Mon Oct 14 04:54:26 PDT 2013


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.


More information about the Digitalmars-d-learn mailing list