[Issue 1482] std.file docs are insufficient
Stewart Gordon
smjg_1998 at yahoo.com
Sat Sep 8 07:53:58 PDT 2007
<d-bugmail at puremagic.com> wrote in message
news:fbsnsp$q84$1 at digitalmars.com...
<snip>
> IMO D or Phobos should have a simple syntax or template that allows you to
> convert any variable to a void[], which is essentially a void* and a
> length.
> Currently I use this (pretty crude) template (which likely can be
> rewritten in
> a much better way):
<snip>
And I use
cast(void[]) (&var)[0..1]
Of course, you'd need to .dup it if you want it to be valid after var has
gone out of scope.
Stewart.
More information about the Digitalmars-d-bugs
mailing list