[libcxx-commits] [PATCH] D47111: <experimental/memory_resource>: Implement monotonic_buffer_resource.

strager via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Oct 11 10:51:54 PDT 2019


strager added inline comments.


================
Comment at: include/experimental/memory_resource:433
+        char *__cur_;
+        size_t __align_;
+        size_t __allocation_size() {
----------------
> Eric suggests replacing size_t __align_ with uint8_t __log2_align_. I'm amenable to this idea, but I'd want to know what's the best way to compute the log2 of a user-supplied number.

Perhaps `std::log2p1` could help: https://en.cppreference.com/w/cpp/numeric/log2p1


Repository:
  rCXX libc++

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

https://reviews.llvm.org/D47111





More information about the libcxx-commits mailing list