[libc-commits] [PATCH] D85103: [libc] Add strspn implementation.

Chris Gyurgyik via Phabricator via libc-commits libc-commits at lists.llvm.org
Tue Aug 4 05:01:14 PDT 2020


cgyurgyik added inline comments.


================
Comment at: libc/src/string/strspn.cpp:21
+// 1 <= sizeof(size_t) <= 32.
+static constexpr size_t BYTESET_SIZE = 32 / sizeof(size_t);
+
----------------
abrachet wrote:
> 32 is supposed to be how many bytes it takes to represent 256 bits? Maybe `(256 / 8) / sizeof(size_t)` is easier to read? This might have actually warranted a comment
> 
> Also should this be called a bitset not a byteset?
I think arguments could be made for both, but I like bitset a bit more.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85103



More information about the libc-commits mailing list