Skip to content

Commit

Permalink
fix experimental filesystem namespace issue
Browse files Browse the repository at this point in the history
  • Loading branch information
sytelus committed Jul 22, 2017
1 parent a7a9c3f commit 4d862af
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions MavLinkCom/MavLinkTest/Commands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,13 @@ void DumpLogCommandsCommand::Execute(std::shared_ptr<MavLinkVehicle> com)
unused(com);
//TODO: make below future proof (i.e. usable by C++17 compiler) - also change same in main.cpp
#if defined(USE_CPP_FILESYSTEM)
//can't use experimental stuff on Linux because of potential ABI issues
#if defined(_WIN32) || ((defined __cplusplus) && (__cplusplus < 201700L))
using namespace std::experimental::filesystem;
#else
using namespace std::filesystem;
#endif

path dirPath(log_folder_);

for (directory_iterator next(dirPath), end; next != end; ++next) {
Expand Down
5 changes: 5 additions & 0 deletions MavLinkCom/MavLinkTest/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,12 @@ std::shared_ptr<MavLinkVehicle> mavLinkVehicle;

#if defined(USE_CPP_FILESYSTEM)

//can't use experimental stuff on Linux because of potential ABI issues
#if defined(_WIN32) || ((defined __cplusplus) && (__cplusplus < 201700L))
using namespace std::experimental::filesystem;
#else
using namespace std::filesystem;
#endif

void ConvertLogFileToJson(std::string logFile)
{
Expand Down

0 comments on commit 4d862af

Please sign in to comment.