[Issue 12742] @nogc std.algorithm.remove

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Dec 6 04:02:14 PST 2014


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

--- Comment #3 from bearophile_hugs at eml.cc ---
It's also not @safe:


import std.algorithm: remove, SwapStrategy;
struct Foo {}
void main() @safe {
    Foo[] foos;
    foos.remove!(x => true, SwapStrategy.unstable);
    foos.remove!(x => true);
}


test.d(5,9): Error: safe function 'D main' cannot call system function
'test.main.remove!((x) => true, cast(SwapStrategy)0, Foo[]).remove'
test.d(6,9): Error: safe function 'D main' cannot call system function
'test.main.remove!((x) => true, cast(SwapStrategy)2, Foo[]).remove'

--


More information about the Digitalmars-d-bugs mailing list