Issue 12845 - @safe std.algorithm.remove on array of tuples
Summary: @safe std.algorithm.remove on array of tuples
Status: RESOLVED WORKSFORME
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: All All
: P1 enhancement
Assignee: No Owner
URL:
Keywords: safe
Depends on:
Blocks:
 
Reported: 2014-06-02 21:49 UTC by bearophile_hugs
Modified: 2016-06-08 04:54 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description bearophile_hugs 2014-06-02 21:49:03 UTC
void main() @safe {
    import std.algorithm: remove;
    import std.typecons: Tuple;
    alias Foo = Tuple!int;
    Foo[] data;
    data.remove!(x => x == Foo());
}


DMD 2.066alpha gives:

temp.d(6,9): Error: safe function 'D main' cannot call system function 'temp.main.remove!((x) => x == Foo(), cast(SwapStrategy)2, Tuple!int[]).remove'
Comment 1 Walter Bright 2016-06-08 04:54:56 UTC
Works with the current compiler.