feat: add a simple way to disable <filesystem>

As jwillikers pointed out in #150, there is a case where compiler
defines the corresponding feature test macro of <filesystem> but is
actually not available. The macro is a way to disable the feature
regardless of the status of feature test macro.
This commit is contained in:
ToruNiina
2021-03-25 11:44:11 +09:00
parent 7782258e68
commit b924e70e3c

View File

@@ -13,12 +13,14 @@
#include "types.hpp"
#include "value.hpp"
#ifndef TOML11_DISABLE_STD_FILESYSTEM
#ifdef __cpp_lib_filesystem
#if __has_include(<filesystem>)
#define TOML11_HAS_STD_FILESYSTEM
#include <filesystem>
#endif // has_include(<string_view>)
#endif // __cpp_lib_filesystem
#endif // TOML11_DISABLE_STD_FILESYSTEM
namespace toml
{