[libc++] Temporarily silence failing debug mode test
Also, fix the actual code so that the test would pass if we fixed the
issue that the method is instantiated in the dylib, and hence the debug
assertion will never fire except if the debug mode is enabled when the
dylib is being compiled.
NOKEYCHECK=True
GitOrigin-RevId: 5c53afe5aac0d295a9345cd439c6caf3ac5eb8ba
diff --git a/include/string b/include/string
index fa42edd..809ae41 100644
--- a/include/string
+++ b/include/string
@@ -2870,6 +2870,10 @@
typename basic_string<_CharT, _Traits, _Allocator>::iterator
basic_string<_CharT, _Traits, _Allocator>::insert(const_iterator __pos, value_type __c)
{
+ _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(&__pos) == this,
+ "string::insert(iterator, character) called with an iterator not"
+ " referring to this string");
+
size_type __ip = static_cast<size_type>(__pos - begin());
size_type __sz = size();
size_type __cap = capacity();