Thread overview | |||||
---|---|---|---|---|---|
|
October 06, 2012 How to create immutable struct? | ||||
---|---|---|---|---|
| ||||
I am have struct with constructor: immutable struct Cell { ... } And I trying to create instance of this struct: immutable (Cell)* s = new Cell( v, s); compiler returns error: Error: cannot implicitly convert expression (new Cell(v,s)) of type Cell* to immutable(Cell)* How to pass immutable to new? |
October 06, 2012 Re: How to create immutable struct? | ||||
---|---|---|---|---|
| ||||
Posted in reply to denizzzka | I should just create immutable constructor :-) |
Copyright © 1999-2021 by the D Language Foundation