[PATCH] D51262: Implement P0553 and P0556

Marshall Clow via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 24 19:32:09 PDT 2019


mclow.lists marked 2 inline comments as done.
mclow.lists added inline comments.


================
Comment at: libcxx/include/bit:199
+        !is_same_v<remove_cv_t<_Tp>, char32_t>
+     > {};
+
----------------
Quuxplusone wrote:
> Given how heavily the code controlled by this trait depends on `numeric_limits<_Tp>`, would it make sense to add something in here about how that specialization should exist?
> 
> I agree with @EricWF's earlier comment: I can't think of any types that would satisfy `(!is_integral_v<_Tp>) && is_unsigned_v<_Tp>`.  (But just TIL that the signedness of `wchar_t` is implementation-defined.)
 `is_unsigned_v<Bignum>` could be true, but `is_integral_v<Bignum>` is not ever true.


================
Comment at: libcxx/include/bit:211
+        ? __t
+        : (__t << (__cnt % __dig)) | (__t >> (__dig - (__cnt % __dig)));
+}
----------------
Quuxplusone wrote:
> No sane compiler would actually generate three `mod` operations for the three instances of repeated subexpression `__cnt % __dig`, would they?
At `-O0`? Sure it would.


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

https://reviews.llvm.org/D51262





More information about the cfe-commits mailing list