[libcxx-commits] [PATCH] D57778: std::abs should not return double (2735)

Zoe Carver via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Feb 6 12:29:42 PST 2019


zoecarver marked 3 inline comments as done.
zoecarver added inline comments.


================
Comment at: test/std/numerics/c.math/abs.pass.cpp:49
+    test_abs<char, int>();
+    
+    test_big();
----------------
mclow.lists wrote:
> Any other integral types you want to try?  `signed char` leaps to mind. (Yes, it's a different type than `char`)
> `bool` (sadly) is integral, but (fortunately) not signed.
> 
> Also, I would sort these differently. Put the floating point ones at the end. (nit)
>     char/signed char/short/int/long/long long
> then
>     int8_t/int16_t/int32_t/int64_t/__int128_t
> and finally
>     float/double/long double
> 
> Not sure about the sized integers - I think you should leave them off for now.
@mclow.lists If int64/int128 are "upgraded" to ints, won't they lose the better half of their data?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57778/new/

https://reviews.llvm.org/D57778





More information about the libcxx-commits mailing list