mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-09-18 02:08:09 +08:00
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:
@@ -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
|
||||
{
|
||||
|
Reference in New Issue
Block a user