__traits(getOverloads, Type, member) order of elements in tuple.

Lodovico Giaretta via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Aug 22 05:24:20 PDT 2016


On Monday, 22 August 2016 at 12:14:41 UTC, Alexandru Ermicioi 
wrote:
> Good day.
>
> In current implementation of dmd/ldc/gdc, does this trait 
> guarantee, that the order of elements returned in tuple, is 
> same, in several calls of it on same Type and member?
>
> Also, is guaranteed that in future versions of dmd, the order 
> of elements won't change?

The official spec [1] does not state anything about this, but for 
other similar traits it says that the order is not defined and 
should not be relied upon, so I'm inclined to think that 
getOverloads works that way too.

Definitely worth an enhancement request, to document this thing.

[1] https://dlang.org/spec/traits.html


More information about the Digitalmars-d-learn mailing list