Re: getOverloads order

2023-07-13 Thread Dennis via Digitalmars-d-learn
On Thursday, 13 July 2023 at 11:04:40 UTC, IchorDev wrote: However, the spec doesn't specify that this is how `getOverloads` **must** work; is this guaranteed behaviour but the spec simply omits it? The order is not guaranteed. I don't know why you need a specific order, but perhaps you can

Re: getOverloads order

2023-07-13 Thread IchorDev via Digitalmars-d-learn
On Thursday, 13 July 2023 at 10:53:49 UTC, Dennis wrote: On Thursday, 13 July 2023 at 08:03:02 UTC, IchorDev wrote: I've noticed that `__traits(getOverloads)` always returns the overloads in lexical order across DMD, LDC, and GDC. Is this reliable at all? No. It depends on the order the

Re: getOverloads order

2023-07-13 Thread Dennis via Digitalmars-d-learn
On Thursday, 13 July 2023 at 08:03:02 UTC, IchorDev wrote: I've noticed that `__traits(getOverloads)` always returns the overloads in lexical order across DMD, LDC, and GDC. Is this reliable at all? No. It depends on the order the compiler analyzes the symbols, which is often lexical order,

getOverloads order

2023-07-13 Thread IchorDev via Digitalmars-d-learn
I've noticed that `__traits(getOverloads)` always returns the overloads in lexical order across DMD, LDC, and GDC. Is this reliable at all?