[libcxx-commits] [PATCH] D61655: [libcxx] teach type_traits test about long uint32_t

Brian Cain via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue May 7 17:48:17 PDT 2019


bcain added a comment.

In D61655#1494372 <https://reviews.llvm.org/D61655#1494372>, @EricWF wrote:

> This LGTM.
>
> Although wouldn't `unsigned int` be the correct choice on all platforms? Because the issue only arises because sometimes `uint32_t` is `unsigned long` instead of `unsigned int`?


The standard only guarantees that `unsigned int` is >= 16 bit so IIUC in that case it can't be compared with `char32_t` here.

C++17 [basic.fundamental] => C99 5.2.4.2.1

I'm not a language lawyer, I had to look this one up.  But AFAICT that's why `unsigned int` is insufficiently portable for this test.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D61655





More information about the libcxx-commits mailing list