在 Xcode 中运行以下 C++ 代码时:
std::wstring str1 = L"1111";
std::wstring str2 = str1;
void* ptr1 = (void*)str1.c_str();
void* ptr2 = (void*)str2.c_str();
结果是两个指针相等。这符合标准吗? 在Visual Studio中情况并非如此。