[libcxx-commits] [libcxx] [libc++] LWG4266: `layout_stride::mapping` should treat empty mappings as exhaustive (PR #191629)
S. B. Tam via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Apr 11 07:16:12 PDT 2026
================
@@ -307,27 +314,12 @@ class layout_stride::mapping {
_LIBCPP_HIDE_FROM_ABI constexpr bool is_exhaustive() const noexcept {
if constexpr (__rank_ == 0)
----------------
cpplearner wrote:
We can always avoid computing `required_span_size()` if `is_always_exhaustive()` is `true`.
```suggestion
if constexpr (is_always_exhaustive())
```
https://github.com/llvm/llvm-project/pull/191629
More information about the libcxx-commits
mailing list