[Issue 8930] New: std.algorithm.move only operates on hasLvalueElements
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Nov 1 09:57:21 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8930
Summary: std.algorithm.move only operates on hasLvalueElements
Product: D
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: monarchdodra at gmail.com
--- Comment #0 from monarchdodra at gmail.com 2012-11-01 09:57:19 PDT ---
//----
import std.algorithm;
import std.container;
void main()
{
auto r = Array!int([1, 2, 3])[];
r.remove!"a == 2"();
}
//----
src\phobos\std\algorithm.d(6740): Error: template std.algorithm.move does not
match any function template declaration
src\phobos\std\algorithm.d(1336): Error: template std.algorithm.move cannot
deduce template function from argument types !()(int,int)
//----
The call to "move" is smart, but pre-supposes the range has Lvalue elements.
remove should be able to work just fine for encapsulating ranges such as
container's.
Just a bit of change in the doc, and sparkle a few static ifs in the
implementation.
--
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