[Issue 21429] Cannot sort large tuple arrays at compile time
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Thu Nov  4 18:23:06 UTC 2021
    
    
  
https://issues.dlang.org/show_bug.cgi?id=21429
Tim <tim.dlang at t-online.de> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tim.dlang at t-online.de
--- Comment #2 from Tim <tim.dlang at t-online.de> ---
It also fails for small arrays, but only if some elements have to be swapped:
enum x = (){
    import std.algorithm, std.typecons;
    auto x = [tuple!int(2), tuple!int(1)];
    x.sort;
    return x;
}();
The problem can also be reproduced by calling swap directly:
enum x = (){
    import std.algorithm, std.typecons;
    Tuple!int a, b;
    swap(a, b);
    return 0;
}();
--
    
    
More information about the Digitalmars-d-bugs
mailing list