D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 17325 - alias this not tried on template instantiation failure
Summary: alias this not tried on template instantiation failure
Status: NEW
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P4 enhancement
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-14 01:11 UTC by Bolpat
Modified: 2024-12-13 18:52 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Bolpat 2017-04-14 01:11:56 UTC
struct Array
{
    int[] arr;
    alias arr this;
}

void main()
{
    import std.algorithm : sort, SwapStrategy;
    Array a;
    sort(a); // fails
    sort!("a < b", SwapStrategy.unstable, int[])(a); // works
    sort(a.arr); // works
}

This is a major limitation for writing wrappers.
Comment 1 dlangBugzillaToGithub 2024-12-13 18:52:02 UTC
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/dmd/issues/17792

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB