diff --git a/include/nana/c++defines.hpp b/include/nana/c++defines.hpp index 4dc62a65..5332d213 100644 --- a/include/nana/c++defines.hpp +++ b/include/nana/c++defines.hpp @@ -1,7 +1,7 @@ /** * Predefined Symbols for C++ * Nana C++ Library(http://www.nanapro.org) - * Copyright(C) 2016-2018 Jinhao(cnjinhao@hotmail.com) + * Copyright(C) 2016-2019 Jinhao(cnjinhao@hotmail.com) * * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at @@ -48,14 +48,15 @@ #ifndef NANA_CXX_DEFINES_INCLUDED #define NANA_CXX_DEFINES_INCLUDED -#define STD_FILESYSTEM_NOT_SUPPORTED +// #define STD_FILESYSTEM_NOT_SUPPORTED //C++ language #if defined(_MSC_VER) -# if (_MSC_VER < 1900) +# if (_MSC_VER < 1900) // VC2013 # //About std.experimental.filesystem. # //Through VC2013 has provided , but all the names are given in namespace std. It's hard to alias these names into std::experimental, # //So Nana use nana.filesystem implement instead for VC2013 +# define STD_FILESYSTEM_NOT_SUPPORTED # # //Nana defines some macros for lack of support of keywords # define _ALLOW_KEYWORD_MACROS @@ -64,8 +65,6 @@ # define noexcept //no support of noexcept until Visual C++ 2015 # define constexpr //no support of constexpr until Visual C++ 2015 ? const ?? -# else -# undef STD_FILESYSTEM_NOT_SUPPORTED # endif #elif defined(__GNUC__) && not defined(__clang__) # if (__GNUC__ == 4 && __GNUC_MINOR__ < 6) @@ -125,16 +124,16 @@ #elif defined(__clang__) //Clang - #include //Introduces some implement-specific flags of ISO C++ Library + #include // Introduces some implement-specific flags of ISO C++ Library #if defined(__GLIBCPP__) || defined(__GLIBCXX__) // is a known issue on libstdc++, it works on libc++ #define STD_CODECVT_NOT_SUPPORTED #endif -#elif defined(__GNUC__) //GCC +#elif defined(__GNUC__) // GCC - #include //Introduces some implement-specific flags of ISO C++ Library + #include // Introduces some implementation-specific flags of ISO C++ Library #if defined(__GLIBCPP__) || defined(__GLIBCXX__) - // is a known issue on libstdc++, it works on libc++ + // is a known issue on libstdc++, it works on libc++ todo review ! #define STD_CODECVT_NOT_SUPPORTED //It's a known issue of libstdc++ on MinGW @@ -155,6 +154,8 @@ # if ((__GNUC__ > 5) || ((__GNUC__ == 5) && (__GNUC_MINOR__ >= 3 ) ) ) # undef STD_FILESYSTEM_NOT_SUPPORTED +# else +# define STD_FILESYSTEM_NOT_SUPPORTED # endif #if (__GNUC__ == 4) diff --git a/include/nana/filesystem/filesystem.hpp b/include/nana/filesystem/filesystem.hpp index 4b30241b..fe39c8d7 100644 --- a/include/nana/filesystem/filesystem.hpp +++ b/include/nana/filesystem/filesystem.hpp @@ -118,7 +118,7 @@ namespace std { # undef NANA_USING_STD_EXPERIMENTAL_FILESYSTEM # define NANA_USING_STD_EXPERIMENTAL_FILESYSTEM # endif -#endif +#endif // BOOST_FILESYSTEM and NANA_FILESYSTEM #if NANA_USING_NANA_FILESYSTEM @@ -585,7 +585,7 @@ namespace std } -#else // not #if NANA_USING_NANA_FILESYSTEM +#else // not #if NANA_USING_NANA_FILESYSTEM and not BOOST_FILESYSTEM, also incomplete STD_FILESYSTEM //Implements the missing functions for various version of experimental/filesystem namespace std { @@ -617,7 +617,7 @@ namespace std } // namespace filesystem } // namespace std -#endif //NANA_USING_NANA_FILESYSTEM +#endif // incomplete STD_FILESYSTEM #include #endif //NANA_FILESYSTEM_HPP diff --git a/include/nana/filesystem/filesystem_ext.hpp b/include/nana/filesystem/filesystem_ext.hpp index b31ff0e2..fd2fe9e7 100644 --- a/include/nana/filesystem/filesystem_ext.hpp +++ b/include/nana/filesystem/filesystem_ext.hpp @@ -15,8 +15,8 @@ #ifndef NANA_FILESYSTEM_EXT_HPP #define NANA_FILESYSTEM_EXT_HPP -#include #include +#include namespace nana { diff --git a/source/filesystem/filesystem.cpp b/source/filesystem/filesystem.cpp index 3c30047b..19128e2a 100644 --- a/source/filesystem/filesystem.cpp +++ b/source/filesystem/filesystem.cpp @@ -11,12 +11,12 @@ * provide some interface for file management */ +#include #include #include #include #include -#include #ifdef _nana_std_put_time #include #else @@ -149,7 +149,7 @@ namespace nana } } -#if NANA_USING_NANA_FILESYSTEM +#if NANA_USING_NANA_FILESYSTEM // and BOOST ? namespace nana_fs = nana::filesystem; namespace nana