diff --git a/include/cpr/filesystem.h b/include/cpr/filesystem.h index 5bf0957f2..f296770cf 100644 --- a/include/cpr/filesystem.h +++ b/include/cpr/filesystem.h @@ -5,14 +5,20 @@ #ifdef CPR_USE_BOOST_FILESYSTEM #define BOOST_FILESYSTEM_VERSION 4 // Use the latest, with the closest behavior to std::filesystem. #include +namespace cpr { namespace fs = boost::filesystem; +} // cppcheck-suppress preprocessorErrorDirective #elif __has_include() #include +namespace cpr { namespace fs = std::filesystem; +} #elif __has_include("experimental/filesystem") #include +namespace cpr { namespace fs = std::experimental::filesystem; +} #else #error "Failed to include header!" #endif