[Issue 17188] `core.stdc.stdlib.qsort()` is broken

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Feb 28 18:22:04 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=17188

Martin Nowak <code at dawg.eu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |code at dawg.eu

--- Comment #7 from Martin Nowak <code at dawg.eu> ---
> As qsort is @system anyway, the callback does not have to guarantee anything. To still be able to pass a function with scope parameters, how about overloading it with both variants

I think we:

- Need to add some sort of wildcard attribute for such cases, as declinating
all 16 combinations of `@nogc`, `pure`, `nothrow`, `@safe` callbacks isn't
feasible.

- Should simply remove scope in this specific case as the function is @system
and scope won't be checked anyhow, overloading with both variants doesn't buy
us anything.

--


More information about the Digitalmars-d-bugs mailing list