std.algorithm move() struct emptying

Torarin torarind at gmail.com
Sun Aug 29 10:00:11 PDT 2010


Hi,
in std.algorithm move(), this is the operation used to set the source of a
struct move to .init:

  static T empty;
  memcpy(&source, &empty, T.sizeof);

Is there any particular reason why the more compact &T.init is not used?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20100829/e9447dbc/attachment-0001.html>


More information about the Digitalmars-d mailing list