On Wed, Jan 30, 2019 at 07:51:17PM +0000, Neia Neutuladh via Digitalmars-d-learn wrote: > On Wed, 30 Jan 2019 10:39:21 -0800, Ali Çehreli wrote: > > import core.demangle; > > > > extern(C) int add(int, int); > > > > void main() { > > alias F = typeof(add); > > pragma(msg, mangle!F("add")); > > pragma(msg, add.mangleof); > > } > > > > Output: > > > > _D3addUiiZi > > add <-- Is that correct? > > `add.mangleof` is correct. In fact, it's definitively correct. > > typeof(add) is extern(C) int function(int, int). Based on this output, > core.demangle seems like it's not taking the extern(C) portion into > account.
That would be a bug in core.demangle. T -- "I suspect the best way to deal with procrastination is to put off the procrastination itself until later. I've been meaning to try this, but haven't gotten around to it yet. " -- swr