[all-commits] [llvm/llvm-project] 2db67e: [libc++] Fix the return value of max_size()
Louis Dionne via All-commits
all-commits at lists.llvm.org
Mon Dec 6 10:53:42 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2db67e97712e257d9784f4c3812432443f72145e
https://github.com/llvm/llvm-project/commit/2db67e97712e257d9784f4c3812432443f72145e
Author: Louis Dionne <ldionne.2 at gmail.com>
Date: 2021-12-06 (Mon, 06 Dec 2021)
Changed paths:
M libcxx/include/string_view
M libcxx/test/std/strings/string.view/string.view.capacity/capacity.pass.cpp
Log Message:
-----------
[libc++] Fix the return value of max_size()
I assume nobody ever uses std::string_view::max_size() outside of
testing. However, we should still return a value that is based on
something with a reasonable rationale. Previously, we would forget
to take into account the size of the character type stored in the
string, and this patch takes that into account.
Thanks to @mclow.lists for pointing out this issue.
Differential Revision: https://reviews.llvm.org/D114395
More information about the All-commits
mailing list