Thread overview
void as Initializer?
Jul 14, 2005
Russ Lewis
Jul 14, 2005
David Medlock
Jul 14, 2005
Stefan
Jul 18, 2005
Russ Lewis
July 14, 2005
What does this declaration mean?
    char[uint.sizeof * 3] buffer = void;
(taken from std.string, line 2049, in dmd 0.128)
July 14, 2005
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
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
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!