[PATCH] D142179: [ADT] Add bit_floor, bit_ceil, and bit_width to bit.h

Kazu Hirata via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 20 09:46:06 PST 2023


kazu marked 2 inline comments as done.
kazu added a comment.

In D142179#4068493 <https://reviews.llvm.org/D142179#4068493>, @RKSimon wrote:

> In D142179#4068454 <https://reviews.llvm.org/D142179#4068454>, @barannikov88 wrote:
>
>> All these functions are `constexpr` in C++20. Should we do the same?
>
> It'd be nice, but IIRC there were a few problems on some compilers when we tried to do this for some of the previous additions (plus for instance bit_cast uses memcpy).

Yes, it would be nice, but for now, I'd focus on providing these functions named consistently with their respective corresponding C++20 functions.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142179



More information about the llvm-commits mailing list