From fd32ba66e2408f2599f9b03a9b2b1ef2c272b7e3 Mon Sep 17 00:00:00 2001 From: dmauro Date: Thu, 28 May 2020 10:43:11 -0400 Subject: [PATCH] Googletest export Fix compile error from protected destructor of std::codecvt PiperOrigin-RevId: 313584603 --- googletest/include/gtest/internal/gtest-port.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h index 0a3bf5e4..948a21f9 100644 --- a/googletest/include/gtest/internal/gtest-port.h +++ b/googletest/include/gtest/internal/gtest-port.h @@ -2047,7 +2047,8 @@ inline int ChDir(const char* dir) { return chdir(dir); } #endif inline FILE* FOpen(const char* path, const char* mode) { #if GTEST_OS_WINDOWS - std::wstring_convert> converter; + struct wchar_codecvt : public std::codecvt {}; + std::wstring_convert converter; std::wstring wide_path = converter.from_bytes(path); std::wstring wide_mode = converter.from_bytes(mode); return _wfopen(wide_path.c_str(), wide_mode.c_str());