[Issue 6672] [CTFE] ICE on compile time std.algorithm.sort

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Sep 27 00:16:11 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=6672


Don <clugdbug at yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugdbug at yahoo.com.au


--- Comment #1 from Don <clugdbug at yahoo.com.au> 2011-09-27 00:15:37 PDT ---
Reduced test case. Interestingly, the fact that this crashes shows that in the
quicksort range, std.sort sometimes swaps elements with themselves! Sounds
inefficient, is that behaviour correct?

void bug6672(ref string lhs, ref string rhs) 
{
    auto tmp = lhs;
    lhs = rhs;
    rhs = tmp;
}

static assert( {
    auto kw = ["a"];
    bug6672(kw[0], kw[0]);
    return true;
}());

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list