[Issue 6586] feqrel for const values too

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Sep 1 12:06:39 PDT 2011


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


Don <clugdbug at yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugdbug at yahoo.com.au


--- Comment #1 from Don <clugdbug at yahoo.com.au> 2011-09-01 12:06:31 PDT ---
I hit this myself a couple of days ago.
I prefer:

int feqrel(X)(const(X) x, const(X) y) @trusted pure nothrow
    if (isFloatingPoint!(X))

which causes less template bloat, and also avoids some unpleasant issues where
x and y are different sizes.

I'm not really sure why double and const(double) need to be different types. It
causes a huge amount of template bloat, and I don't think we're getting much
(if anything) in return.

-- 
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