Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
......@@ -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<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_mode = converter.from_bytes(mode);
return _wfopen(wide_path.c_str(), wide_mode.c_str());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment