Skip to content

Commit

Permalink
Merge pull request #934 from kone-tlammi/master
Browse files Browse the repository at this point in the history
Avoid conflicts with external components
  • Loading branch information
COM8 authored Aug 1, 2023
2 parents 09e9f84 + fc18ec5 commit b8e2eda
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/cpr/filesystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <boost/filesystem.hpp>
namespace cpr {
namespace fs = boost::filesystem;
}
// cppcheck-suppress preprocessorErrorDirective
#elif __has_include(<filesystem>)
#include <filesystem>
namespace cpr {
namespace fs = std::filesystem;
}
#elif __has_include("experimental/filesystem")
#include <experimental/filesystem>
namespace cpr {
namespace fs = std::experimental::filesystem;
}
#else
#error "Failed to include <filesystem> header!"
#endif
Expand Down

0 comments on commit b8e2eda

Please sign in to comment.