Skip to content

Commit 80f6b05

Browse files
authored
Update string
1 parent 1d9e567 commit 80f6b05

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

libcxx/include/string

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2279,6 +2279,7 @@ private:
22792279
}
22802280
enum { __alignment = 8 };
22812281
static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type __recommend(size_type __s) _NOEXCEPT {
2282+
_LIBCPP_ASSERT_INTERNAL(__s >= __min_cap, "recommend is called for small string capacity");
22822283
const size_type __boundary = sizeof(value_type) < __alignment ? __alignment / sizeof(value_type) : __endian_factor;
22832284
size_type __guess = __align_it<__boundary>(__s + 1) - 1;
22842285
_LIBCPP_ASSERT_INTERNAL(__guess >= __s, "recommendation is below the requested size");

0 commit comments

Comments
 (0)