[libcxx-commits] [libcxx] [libc++] Implement LWG3662 basic_string::append/assign(NTBS, pos, n) suboptimal (PR #206320)

Hristo Hristov via libcxx-commits libcxx-commits at lists.llvm.org
Sun Jun 28 12:24:20 PDT 2026


================
@@ -0,0 +1,84 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+// <string>
+
+// constexpr basic_string& assign(const charT* s, size_type pos, size_type n);
+
+#include <string>
+#include <stdexcept>
+#include <cassert>
+
+#include "test_macros.h"
+#include "min_allocator.h"
+#include "asan_testing.h"
----------------
Zingam wrote:

```suggestion
#include <cassert>
#include <stdexcept>
#include <string>

#include "asan_testing.h"
#include "min_allocator.h"
#include "test_macros.h"
```

Please sort the includes. This has been a requirement for a while now.

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


More information about the libcxx-commits mailing list