diff --git a/include/fmt/std.h b/include/fmt/std.h index 82fa5278d038..b00e402255f5 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 {