add filesystem workaround(#471)

This commit is contained in:
Jinhao 2019-08-05 06:14:23 +08:00
parent 5f49e1f12f
commit d0251ed6c3
3 changed files with 8 additions and 13 deletions

View File

@ -14,8 +14,8 @@
<Option compiler="gcc" /> <Option compiler="gcc" />
<Option createDefFile="1" /> <Option createDefFile="1" />
<Compiler> <Compiler>
<Add option="-std=c++11" />
<Add option="-Wall" /> <Add option="-Wall" />
<Add option="-std=c++11" />
<Add option="-g" /> <Add option="-g" />
<Add directory="../../include" /> <Add directory="../../include" />
<Add directory="../../extrlib/mingw" /> <Add directory="../../extrlib/mingw" />

View File

@ -561,22 +561,19 @@ namespace std {
} }
} // std } // std
#else #else
//Implements the missing functions for various version of experimental/filesystem //Implements the missing functions for various version of experimental/filesystem
# if defined(NANA_USING_STD_EXPERIMENTAL_FILESYSTEM)
namespace std namespace std
{ {
namespace filesystem namespace filesystem
{ {
//Visual Studio 2017 //Visual Studio 2017
#if (defined(_MSC_VER) && (_MSC_VER > 1912)) || \ #if (defined(NANA_USING_STD_EXPERIMENTAL_FILESYSTEM) && defined(_MSC_VER) && (_MSC_VER > 1912)) || \
(!defined(__clang__) && defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ < 801)) (!defined(__clang__) && defined(__GNUC__) && (__cplusplus < 201603))
path weakly_canonical(const path& p); path weakly_canonical(const path& p);
path weakly_canonical(const path& p, std::error_code& err); path weakly_canonical(const path& p, std::error_code& err);
#endif #endif
} }
} }
# endif
#endif //NANA_USING_NANA_FILESYSTEM #endif //NANA_USING_NANA_FILESYSTEM

View File

@ -1399,16 +1399,15 @@ namespace std
}//end namespace filesystem }//end namespace filesystem
}//end namespace std }//end namespace std
#else //NANA_USING_NANA_FILESYSTEM #else //else NANA_USING_NANA_FILESYSTEM
# if defined(NANA_USING_STD_EXPERIMENTAL_FILESYSTEM)
//Defines the functions that are not provided by experimental/filesystem //Defines the functions that are not provided by experimental/filesystem
namespace std namespace std
{ {
namespace filesystem namespace filesystem
{ {
#if (defined(_MSC_VER) && (_MSC_VER > 1912)) || \ #if (defined(NANA_USING_STD_EXPERIMENTAL_FILESYSTEM) && defined(_MSC_VER) && (_MSC_VER > 1912)) || \
(!defined(__clang__) && defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ < 801)) (!defined(__clang__) && defined(__GNUC__) && (__cplusplus < 201603))
namespace detail namespace detail
{ {
@ -1551,10 +1550,9 @@ namespace std
{ {
return weakly_canonical(p, &err); return weakly_canonical(p, &err);
} }
#endif #endif
} }
} }
# endif
#endif //NANA_USING_NANA_FILESYSTEM #endif //NANA_USING_NANA_FILESYSTEM