memcpy, memset, memcmp and friends in the D Runtime

monarch_dodra monarchdodra at gmail.com
Thu Apr 10 11:37:32 PDT 2014


On Thursday, 10 April 2014 at 16:59:27 UTC, Daniel Murphy wrote:
> "monarch_dodra"  wrote in message 
> news:obksandhskaldxplghme at forum.dlang.org...
>
>> Because those are assignments.
>
> You mean they might call postblit etc?  I'd still rather cast 
> to ubyte[] before assigning than call memset.

Yeah, but you can't cast to ubyte with CTFE. So you still end up 
pulling out boilerplate code "at call site", when you could just 
"deal with it" it a generic way in a named function.


More information about the Digitalmars-d mailing list