use experimental filesystem path for Ubuntu 18.04
This commit is contained in:
parent
6fdfa67c41
commit
65eead0079
|
@ -32,7 +32,7 @@ class Configuration : public Node
|
|||
private:
|
||||
|
||||
Animation auto_refresher = Animation(std::bind(&Configuration::refresh, this));
|
||||
std::filesystem::file_time_type config_modification_time = std::filesystem::file_time_type::clock::now();
|
||||
fs::file_time_type config_modification_time = fs::file_time_type::clock::now();
|
||||
std::vector<fs::path> files_to_refresh;
|
||||
|
||||
/*!
|
||||
|
@ -267,11 +267,11 @@ namespace glm
|
|||
}
|
||||
|
||||
/* Extend std::filesystem so nlohmann::json can read and write std::filesystem::path */
|
||||
// #if defined(__MINGW32__)
|
||||
// namespace std::experimental::filesystem
|
||||
// #else
|
||||
#if defined(__UBUNTU18__)
|
||||
namespace std::experimental::filesystem
|
||||
#else
|
||||
namespace std::filesystem
|
||||
// #endif
|
||||
#endif
|
||||
{
|
||||
template <typename T>
|
||||
void to_json(nlohmann::json& j, const path& p)
|
||||
|
|
|
@ -53,7 +53,7 @@ Game::Game(std::initializer_list<std::string> configuration_merge)
|
|||
|
||||
/* Log the current working directory as seen by std::filesystem */
|
||||
std::ostringstream log_message;
|
||||
log_message << "Current path as seen by std::filesystem is " << std::filesystem::current_path();
|
||||
log_message << "Current path as seen by std::filesystem is " << fs::current_path();
|
||||
sb::Log::log(log_message);
|
||||
|
||||
/* Load the key mappings into the input manager object */
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#pragma once
|
||||
|
||||
/* MinGW filesystem library is in another location */
|
||||
// #if defined(__MINGW32__)
|
||||
// #include <experimental/filesystem>
|
||||
// namespace fs = std::experimental::filesystem;
|
||||
// #else
|
||||
/* C++17's filesystem library is still experimental in Ubuntu 18.04's clang-10 */
|
||||
#if defined(__UBUNTU18__)
|
||||
#include <experimental/filesystem>
|
||||
namespace fs = std::experimental::filesystem;
|
||||
#else
|
||||
#include <filesystem>
|
||||
namespace fs = std::filesystem;
|
||||
// #endif
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue