[Issue 6531] New: assertion failure in std.range.iota
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Fri Aug 19 07:49:32 PDT 2011
    
    
  
http://d.puremagic.com/issues/show_bug.cgi?id=6531
           Summary: assertion failure in std.range.iota
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: major
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: andrej.mitrovich at gmail.com
--- Comment #0 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2011-08-19 07:49:29 PDT ---
import std.range;
import std.stdio;
void main()
{
   auto r1 = iota(0.0, 4.0, 0.03);  // ok
   auto r2 = iota(0.0, 3.0, 0.03);  //
core.exception.AssertError at std.range(4001): Assertion failure
}
I want a range in steps of 0.03, beginning at 0.0 and ending at the
closest point to 3.0.
Line 4001 is:
assert(start + count * step >= end);
There's no documentation, and no custom assert message, so I don't know what
was the intention of the author.
It doesn't help that this fails in debug mode but works fine in release mode.
-- 
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