From 141380172f05adff3cc4e565e577d73c4b9220d6 Mon Sep 17 00:00:00 2001 From: Vladislav Shchapov Date: Mon, 9 Dec 2024 20:13:24 +0500 Subject: [PATCH] Allow disabling by define FMT_CPP_LIB_FILESYSTEM=0 (#4259) Signed-off-by: Vladislav Shchapov --- include/fmt/std.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/fmt/std.h b/include/fmt/std.h index 82fa5278..b00e4022 100644 --- a/include/fmt/std.h +++ b/include/fmt/std.h @@ -27,6 +27,10 @@ // Check FMT_CPLUSPLUS to suppress a bogus warning in MSVC. # if FMT_CPLUSPLUS >= 201703L +# if FMT_HAS_INCLUDE() && \ + (!defined(FMT_CPP_LIB_FILESYSTEM) || FMT_CPP_LIB_FILESYSTEM != 0) +# include +# endif # if FMT_HAS_INCLUDE() # include # endif @@ -76,7 +80,6 @@ #endif #if FMT_CPP_LIB_FILESYSTEM -# include FMT_BEGIN_NAMESPACE namespace detail {