http://d.puremagic.com/issues/show_bug.cgi?id=5089

           Summary: feqrel does not compile for floats
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nob...@puremagic.com
        ReportedBy: ah0801...@yahoo.com


--- Comment #0 from Austin Hastings <ah0801...@yahoo.com> 2010-10-20 16:07:10 
PDT ---
With 2.049, this code:
==========
module scratch;

import std.math;

void foo() {
    float a = 1, b = 1.00000000001;

    auto same = feqrel( a, b ) > 15;
}
==========

Emits this diagnostic:
==========
$ dmd scratch.d
d:\Devel\D\dmd2\windows\bin\..\..\src\phobos\std\math.d(3286): Error: function
std.math.feqrel!(float).feqrel has no return statement, but is expected to
return a value of type int
d:\Devel\D\dmd2\windows\bin\..\..\src\phobos\std\math.d(8): Error: template
instance std.math.feqrel!(float) error instantiating
==========

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to