Changed preprocessors checks for wchar_t constructs of iostreams from __GNUC__ to __GLIBCXX__ as libc++ provides these on Windows as well

This commit is contained in:
zero9178 2020-08-21 03:01:50 +02:00
parent 2ea00170e1
commit 0e40179aeb

View File

@ -1109,7 +1109,7 @@ public:
const basic_filebuf& operator=(const basic_filebuf&) = delete; const basic_filebuf& operator=(const basic_filebuf&) = delete;
basic_filebuf<charT, traits>* open(const path& p, std::ios_base::openmode mode) basic_filebuf<charT, traits>* open(const path& p, std::ios_base::openmode mode)
{ {
#if defined(GHC_OS_WINDOWS) && !defined(__GNUC__) #if defined(GHC_OS_WINDOWS) && !defined(__GLIBCXX__)
return std::basic_filebuf<charT, traits>::open(p.wstring().c_str(), mode) ? this : 0; return std::basic_filebuf<charT, traits>::open(p.wstring().c_str(), mode) ? this : 0;
#else #else
return std::basic_filebuf<charT, traits>::open(p.string().c_str(), mode) ? this : 0; return std::basic_filebuf<charT, traits>::open(p.string().c_str(), mode) ? this : 0;
@ -1122,7 +1122,7 @@ class basic_ifstream : public std::basic_ifstream<charT, traits>
{ {
public: public:
basic_ifstream() {} basic_ifstream() {}
#if defined(GHC_OS_WINDOWS) && !defined(__GNUC__) #if defined(GHC_OS_WINDOWS) && !defined(__GLIBCXX__)
explicit basic_ifstream(const path& p, std::ios_base::openmode mode = std::ios_base::in) explicit basic_ifstream(const path& p, std::ios_base::openmode mode = std::ios_base::in)
: std::basic_ifstream<charT, traits>(p.wstring().c_str(), mode) : std::basic_ifstream<charT, traits>(p.wstring().c_str(), mode)
{ {
@ -1145,7 +1145,7 @@ class basic_ofstream : public std::basic_ofstream<charT, traits>
{ {
public: public:
basic_ofstream() {} basic_ofstream() {}
#if defined(GHC_OS_WINDOWS) && !defined(__GNUC__) #if defined(GHC_OS_WINDOWS) && !defined(__GLIBCXX__)
explicit basic_ofstream(const path& p, std::ios_base::openmode mode = std::ios_base::out) explicit basic_ofstream(const path& p, std::ios_base::openmode mode = std::ios_base::out)
: std::basic_ofstream<charT, traits>(p.wstring().c_str(), mode) : std::basic_ofstream<charT, traits>(p.wstring().c_str(), mode)
{ {
@ -1168,7 +1168,7 @@ class basic_fstream : public std::basic_fstream<charT, traits>
{ {
public: public:
basic_fstream() {} basic_fstream() {}
#if defined(GHC_OS_WINDOWS) && !defined(__GNUC__) #if defined(GHC_OS_WINDOWS) && !defined(__GLIBCXX__)
explicit basic_fstream(const path& p, std::ios_base::openmode mode = std::ios_base::in | std::ios_base::out) explicit basic_fstream(const path& p, std::ios_base::openmode mode = std::ios_base::in | std::ios_base::out)
: std::basic_fstream<charT, traits>(p.wstring().c_str(), mode) : std::basic_fstream<charT, traits>(p.wstring().c_str(), mode)
{ {