test case: import std.algorithm; void main() { float[10] arr; arr[] = 0.0; map!((ref float sample){ sample = 1.0; })(arr[]); } D:\DMD\dmd2\windows\bin\..\..\src\phobos\std\algorithm.d(382): Error: nan is not an lvalue This looks like a bug to me?