[libcxx-commits] [libcxx] [libc++][string] P3044R2: sub-`string_view` from `string` (PR #147095)

Hristo Hristov via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jul 22 23:07:38 PDT 2025


================
@@ -0,0 +1,20 @@
+//===----------------------------------------------------------------------===//
+//
+// 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_view>
+
+// constexpr basic_string_view subview(size_type pos = 0,
+//                                     size_type n = npos) const;      // freestanding-deleted
+
+int main(int, char**) {
+  // This test is intentionally empty because subview is an alias for substr
+  // and is tested in substr.pass.cpp.
----------------
H-G-Hristov wrote:

WDYT: Should I remove the file now? How we are supposed to tell the user where to look after the actual implementation of the test otherwise?
Maybe rename the other test file to `substr.subview.pass.cpp`? Would that be OK?

https://github.com/llvm/llvm-project/pull/147095


More information about the libcxx-commits mailing list