Bug 12845 – @safe std.algorithm.remove on array of tuples

Status
RESOLVED
Resolution
WORKSFORME
Severity
enhancement
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-06-02T21:49:00Z
Last change time
2016-06-08T04:54:56Z
Keywords
safe
Assigned to
nobody
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2014-06-02T21:49:03Z
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 by bugzilla — 2016-06-08T04:54:56Z
Works with the current compiler.