1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-09-15 06:52:34 +02:00
openrw/rwcore/rw/filesystem.hpp
2021-10-12 18:19:20 +02:00

35 lines
696 B
C++

#ifndef _LIBRW_FILESYSTEM_HPP_
#define _LIBRW_FILESYSTEM_HPP_
#define RW_FS_CXX17 0
#define RW_FS_CXXTS 1
#if RW_FS_LIBRARY == RW_FS_CXX17
#include <filesystem>
#include <system_error>
namespace rwfs {
using namespace std::filesystem;
using error_code = std::error_code;
}
#elif RW_FS_LIBRARY == RW_FS_CXXTS
#include <experimental/filesystem>
#include <system_error>
namespace rwfs {
using namespace std::experimental::filesystem;
using error_code = std::error_code;
}
#else
#error Invalid RW_FS_LIBRARY value
#endif
namespace std {
template <>
struct hash<rwfs::path> {
size_t operator()(const rwfs::path& p) const {
return rwfs::hash_value(p);
}
};
}
#endif