Commit fd32ba66 authored by dmauro's avatar dmauro Committed by Derek Mauro
Browse files

Googletest export

Fix compile error from protected destructor of std::codecvt

PiperOrigin-RevId: 313584603
parent 85a46319
...@@ -2047,7 +2047,8 @@ inline int ChDir(const char* dir) { return chdir(dir); } ...@@ -2047,7 +2047,8 @@ inline int ChDir(const char* dir) { return chdir(dir); }
#endif #endif
inline FILE* FOpen(const char* path, const char* mode) { inline FILE* FOpen(const char* path, const char* mode) {
#if GTEST_OS_WINDOWS #if GTEST_OS_WINDOWS
std::wstring_convert<std::codecvt<wchar_t, char, std::mbstate_t>> converter; struct wchar_codecvt : public std::codecvt<wchar_t, char, std::mbstate_t> {};
std::wstring_convert<wchar_codecvt> converter;
std::wstring wide_path = converter.from_bytes(path); std::wstring wide_path = converter.from_bytes(path);
std::wstring wide_mode = converter.from_bytes(mode); std::wstring wide_mode = converter.from_bytes(mode);
return _wfopen(wide_path.c_str(), wide_mode.c_str()); return _wfopen(wide_path.c_str(), wide_mode.c_str());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment