On Wednesday, 30 January 2019 at 05:14:20 UTC, Sobaya wrote:
I want to get a mangled name of a D function by
`core.demangle.mangle`, but I'm in trouble because there are no
ways to express a type of a function, which is used for a
template argument of `mangle`.
Did you consider
On Wednesday, 30 January 2019 at 05:14:20 UTC, Sobaya wrote:
I want to get a mangled name of a D function by
`core.demangle.mangle`, but I'm in trouble because there are no
ways to express a type of a function, which is used for a
template argument of `mangle`.
There's a way:
int add(int i,
On 1/30/19 1:39 PM, Ali Çehreli wrote:
On 01/30/2019 07:47 AM, Steven Schveighoffer wrote:
> On 1/30/19 12:14 AM, Sobaya wrote:
>> I want to get a mangled name of a D function by
>> `core.demangle.mangle`, but I'm in trouble because there are no ways
>> to express a type of a function, which
On Wed, 30 Jan 2019 12:56:06 -0800, Ali Çehreli wrote:
> I remember names like _add. Is that a Windows thing?
A number of functions are implemented as manually-mangled names with
preprocessor macros that forward to them. It's weird, but it happens.
On 01/30/2019 11:42 AM, H. S. Teoh wrote:
On Wed, Jan 30, 2019 at 10:39:21AM -0800, Ali Çehreli via Digitalmars-d-learn
wrote:
[...]
I wonder why the inconsistency. On the other hand, .mangleof produces
just "add" when the function is extern(C). (?)
[...]
For extern(C), this is correct
On Wed, Jan 30, 2019 at 07:51:17PM +, 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,
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
On Wed, Jan 30, 2019 at 10:39:21AM -0800, Ali Çehreli via Digitalmars-d-learn
wrote:
[...]
> I wonder why the inconsistency. On the other hand, .mangleof produces
> just "add" when the function is extern(C). (?)
[...]
For extern(C), this is correct behaviour, because that's how a C
function
On 01/30/2019 07:47 AM, Steven Schveighoffer wrote:
> On 1/30/19 12:14 AM, Sobaya wrote:
>> I want to get a mangled name of a D function by
>> `core.demangle.mangle`, but I'm in trouble because there are no ways
>> to express a type of a function, which is used for a template argument
>> of
On 1/30/19 12:14 AM, Sobaya wrote:
I want to get a mangled name of a D function by `core.demangle.mangle`,
but I'm in trouble because there are no ways to express a type of a
function, which is used for a template argument of `mangle`.
For example, it is wrong to use the type `int
On 01/29/2019 09:14 PM, Sobaya wrote:
I want to get a mangled name of a D function by `core.demangle.mangle`,
but I'm in trouble because there are no ways to express a type of a
function, which is used for a template argument of `mangle`.
For example, it is wrong to use the type `int
On Wednesday, 30 January 2019 at 06:02:02 UTC, FrankLike wrote:
On Wednesday, 30 January 2019 at 05:40:50 UTC, FrankLike wrote:
On Wednesday, 30 January 2019 at 05:14:20 UTC, Sobaya wrote:
[...]
import std.stdio;
import std.process:executeShell;
import core.demangle;
void main()
{
On Wednesday, 30 January 2019 at 05:40:50 UTC, FrankLike wrote:
On Wednesday, 30 January 2019 at 05:14:20 UTC, Sobaya wrote:
I want to get a mangled name of a D function by
`core.demangle.mangle`, but I'm in trouble because there are
no ways to express a type of a function, which is used for a
On Wednesday, 30 January 2019 at 05:14:20 UTC, Sobaya wrote:
I want to get a mangled name of a D function by
`core.demangle.mangle`, but I'm in trouble because there are no
ways to express a type of a function, which is used for a
template argument of `mangle`.
For example, it is wrong to
I want to get a mangled name of a D function by
`core.demangle.mangle`, but I'm in trouble because there are no
ways to express a type of a function, which is used for a
template argument of `mangle`.
For example, it is wrong to use the type `int function(int,int)`
to express the type of
15 matches
Mail list logo