[libcxx-commits] [PATCH] D114129: [libc++] Fix `uniform_int_distribution` for 128-bit result type

Fabian Wolff via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Nov 30 12:25:11 PST 2021


fwolff marked 3 inline comments as done.
fwolff added a comment.

In D114129#3158805 <https://reviews.llvm.org/D114129#3158805>, @Mordante wrote:

> I prefer to allow this extension; I even wonder whether not allowing 128-bit values was intentionally or an artifact of prohibiting `(un)signed char`. In general I prefer to allow `__[u]int128_t` to be used as a first-class citizen in libc++.

Yes, this is also how I feel about this.

In D114129#3158555 <https://reviews.llvm.org/D114129#3158555>, @ldionne wrote:

> [...] or provide this as an extension (in which case we should probably annotate that it is an extension).

What does that mean exactly, annotating it as an extension?



================
Comment at: libcxx/include/__random/log2.h:61-66
+        typename conditional
+            <
+                sizeof(_UIntType) <= sizeof(unsigned long long),
+                    unsigned long long,
+                    __uint128_t
+            >::type,
----------------
ldionne wrote:
> Or something like that -- the current formatting looks really weird with the `<` alone on its own line.
Fixed, although I followed the precedent of `_Working_result_type` from `__independent_bits_engine` here.


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

https://reviews.llvm.org/D114129



More information about the libcxx-commits mailing list