core.thread.memcpy conflicts with core.stdc.string.memcpy
(too old to reply)
Marco Leise via Digitalmars-d
2014-10-17 09:28:17 UTC
When I read that error I wondered why anyone would define a
function for threads with the same name as a well established
C function. On a closer look it revealed to be just another
name for the same extern(C) memcpy to avoid the import of
core.stdc.string in core.thread:

import core.sync.mutex;
import core.atomic;

// from core.memory
extern (C) void gc_enable();
extern (C) void gc_disable();
extern (C) void* gc_malloc(size_t sz, uint ba = 0);

// from core.stdc.string
extern (C) void* memcpy(void*, const void*, size_t);

// exposed by compiler runtime
extern (C) void rt_moduleTlsCtor();
extern (C) void rt_moduleTlsDtor();

alias void delegate() gc_atom;
extern (C) void function(scope gc_atom) gc_atomic;

Well, it is mildly annoying. `private` doesn't really help in
the way the author expected it to work here.