[libcxx-commits] [libcxx] [libc++][NFC] Rewrite function call on two lines for clarity (PR #79141)

via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jan 23 14:30:33 PST 2024


================
@@ -1948,8 +1948,8 @@ private:
     if (__s < __min_cap) {
       return static_cast<size_type>(__min_cap) - 1;
     }
-    size_type __guess =
-        __align_it < sizeof(value_type) < __alignment ? __alignment / sizeof(value_type) : 1 > (__s + 1) - 1;
+    const size_type __boundary = sizeof(value_type) < __alignment ? __alignment / sizeof(value_type) : 1;
----------------
EricWF wrote:

Alternatively, we could also make `__boundary` part of the enumerator?

I have a weak distaste for using `const` on a variable we need to be `constexpr`. But  it shouldn't be an issue here at all.

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


More information about the libcxx-commits mailing list