[libcxx-commits] [libcxx] [libc++] Optimize string operator[] for known large inputs (PR #69500)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Oct 19 18:21:55 PDT 2023
================
@@ -1198,11 +1198,17 @@ public:
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 const_reference operator[](size_type __pos) const _NOEXCEPT {
----------------
ldionne wrote:
Let's add a few tests with clearly-constant indices in `libcxx/test/std/strings/basic.string/string.access/index.pass.cpp`. Otherwise I think this code path might not be tested.
https://github.com/llvm/llvm-project/pull/69500
More information about the libcxx-commits
mailing list