From 6dffed543abcd901b2c56fd70854e37fae58db47 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Thu, 2 Nov 2017 03:30:45 +0100 Subject: [PATCH] rwlib: add error_code to rwfs namespace Some rwfs functions need an error_code argument. --- rwlib/source/rw/filesystem.hpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/rwlib/source/rw/filesystem.hpp b/rwlib/source/rw/filesystem.hpp index 2ae94ec1..46203f16 100644 --- a/rwlib/source/rw/filesystem.hpp +++ b/rwlib/source/rw/filesystem.hpp @@ -7,14 +7,26 @@ #if RW_FS_LIBRARY == RW_FS_CXX17 #include -namespace rwfs = std::filesystem; +#include +namespace rwfs { + using namespace std::filesystem; + using error_code = std::error_code; +} #elif RW_FS_LIBRARY == RW_FS_CXXTS #include -namespace rwfs = std::experimental::filesystem; +#include +namespace rwfs { + using namespace std::experimental::filesystem; + using error_code = std::error_code; +} #elif RW_FS_LIBRARY == RW_FS_BOOST #include #include -namespace rwfs = boost::filesystem; +#include +namespace rwfs { + using namespace boost::filesystem; + using error_code = boost::system::error_code; +} #if BOOST_VERSION < 105600 namespace boost { namespace filesystem {