[libcxx-commits] [libcxx] [libcxx] Recalculate union-member sizes in basic_string (PR #168742)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Nov 19 10:02:49 PST 2025
================
@@ -0,0 +1,114 @@
+#include <stdint.h>
+#include <string>
+#include <algorithm>
+#include <cassert>
+
+#include "test_macros.h"
+
+template<typename Char>
+void test_string() {
+ // Make a test string.
+ std::basic_string<Char> s;
+ LIBCPP_ASSERT(s.size() == 0);
----------------
frederick-vs-ja wrote:
Why not `assert`? I believe this is standard-guaranteed.
https://github.com/llvm/llvm-project/pull/168742
More information about the libcxx-commits
mailing list