Thread overview | ||||||
---|---|---|---|---|---|---|
|
July 14, 2005 void as Initializer? | ||||
---|---|---|---|---|
| ||||
What does this declaration mean? char[uint.sizeof * 3] buffer = void; (taken from std.string, line 2049, in dmd 0.128) |
July 14, 2005 Re: void as Initializer? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Russ Lewis | Russ Lewis wrote:
> What does this declaration mean?
> char[uint.sizeof * 3] buffer = void;
> (taken from std.string, line 2049, in dmd 0.128)
I believe it means do not initialize the buffer.
Its an optimization.
|
July 14, 2005 Re: void as Initializer? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Russ Lewis | In article <db5v7u$2thc$1@digitaldaemon.com>, Russ Lewis says... > >What does this declaration mean? > char[uint.sizeof * 3] buffer = void; >(taken from std.string, line 2049, in dmd 0.128) It's documented here: http://www.digitalmars.com/d/memory.html#uninitializedarrays Best regards, Stefan |
July 18, 2005 Re: void as Initializer? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Stefan | Stefan wrote:
> In article <db5v7u$2thc$1@digitaldaemon.com>, Russ Lewis says...
>
>>What does this declaration mean?
>> char[uint.sizeof * 3] buffer = void;
>>(taken from std.string, line 2049, in dmd 0.128)
>
>
> It's documented here:
>
> http://www.digitalmars.com/d/memory.html#uninitializedarrays
>
> Best regards,
> Stefan
>
>
Cool, thanks for the pointer to the official answer!
|
Copyright © 1999-2021 by the D Language Foundation