[libcxx-commits] [libcxx] [libc++] Refactor some code in monotonic_buffer_resource (PR #117271)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Tue Nov 26 13:33:28 PST 2024


================
@@ -27,8 +27,8 @@ namespace pmr {
 // [mem.res.monotonic.buffer]
 
 class _LIBCPP_AVAILABILITY_PMR _LIBCPP_EXPORTED_FROM_ABI monotonic_buffer_resource : public memory_resource {
-  static const size_t __default_buffer_capacity  = 1024;
-  static const size_t __default_buffer_alignment = 16;
+  static constexpr size_t __default_buffer_capacity = 1024;
+  static constexpr size_t __default_growth_factor   = 2;
----------------
ldionne wrote:

Yes, if it's not used from the headers we might as well move it to the `.cpp` file instead.

https://github.com/llvm/llvm-project/pull/117271


More information about the libcxx-commits mailing list