[libcxx-commits] [libcxx] [libc++][string] P3044R2: sub-`string_view` from `string` (PR #147095)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Aug 1 10:41:48 PDT 2025
================
@@ -0,0 +1,88 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// REQUIRES: std-at-least-c++26
+
+// <string>
+
+// constexpr basic_string_view<_CharT, _Traits> subview(size_type __pos = 0, size_type __n = npos) const;
----------------
ldionne wrote:
Missing test coverage:
- check that the method is marked as `const`
- check that we throw an exception when we're calling this with out-of-range arguments (there are various combinations of out-of-range arguments)
https://github.com/llvm/llvm-project/pull/147095
More information about the libcxx-commits
mailing list