Skip to content

Commit 46db4d8

Browse files
authored
Merge pull request #69 from zero9178/master
Allow wchar_t constructors of iostreams on Windows when using libc++
2 parents 2ea0017 + 0e40179 commit 46db4d8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

include/ghc/filesystem.hpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -1109,7 +1109,7 @@ class basic_filebuf : public std::basic_filebuf<charT, traits>
11091109
const basic_filebuf& operator=(const basic_filebuf&) = delete;
11101110
basic_filebuf<charT, traits>* open(const path& p, std::ios_base::openmode mode)
11111111
{
1112-
#if defined(GHC_OS_WINDOWS) && !defined(__GNUC__)
1112+
#if defined(GHC_OS_WINDOWS) && !defined(__GLIBCXX__)
11131113
return std::basic_filebuf<charT, traits>::open(p.wstring().c_str(), mode) ? this : 0;
11141114
#else
11151115
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>
11221122
{
11231123
public:
11241124
basic_ifstream() {}
1125-
#if defined(GHC_OS_WINDOWS) && !defined(__GNUC__)
1125+
#if defined(GHC_OS_WINDOWS) && !defined(__GLIBCXX__)
11261126
explicit basic_ifstream(const path& p, std::ios_base::openmode mode = std::ios_base::in)
11271127
: std::basic_ifstream<charT, traits>(p.wstring().c_str(), mode)
11281128
{
@@ -1145,7 +1145,7 @@ class basic_ofstream : public std::basic_ofstream<charT, traits>
11451145
{
11461146
public:
11471147
basic_ofstream() {}
1148-
#if defined(GHC_OS_WINDOWS) && !defined(__GNUC__)
1148+
#if defined(GHC_OS_WINDOWS) && !defined(__GLIBCXX__)
11491149
explicit basic_ofstream(const path& p, std::ios_base::openmode mode = std::ios_base::out)
11501150
: std::basic_ofstream<charT, traits>(p.wstring().c_str(), mode)
11511151
{
@@ -1168,7 +1168,7 @@ class basic_fstream : public std::basic_fstream<charT, traits>
11681168
{
11691169
public:
11701170
basic_fstream() {}
1171-
#if defined(GHC_OS_WINDOWS) && !defined(__GNUC__)
1171+
#if defined(GHC_OS_WINDOWS) && !defined(__GLIBCXX__)
11721172
explicit basic_fstream(const path& p, std::ios_base::openmode mode = std::ios_base::in | std::ios_base::out)
11731173
: std::basic_fstream<charT, traits>(p.wstring().c_str(), mode)
11741174
{

0 commit comments

Comments
 (0)