|
Boost : |
Subject: [boost] [filesystem] and C++17 std::filesystem
From: Egor Pugin (egor.pugin_at_[hidden])
Date: 2018-05-07 22:23:29
Hi!
gcc8.1 and VS15.7 (2017) are now shipped with std::filesystem.
I'd like to raise a discussion about pure c++ interoperability with
boost(::filesystem).
With boost-1.67 it's not possible to do such things:
#if __has_include(<filesystem>)
#include <filesystem>
namespace fs = std::filesystem;
#else
#include <boost/filesystem.hpp>
namespace fs = boost::filesystem;
#endif
Because of
boost::filesystem::copy_option::overwrite_if_exists !=
std::filesystem::copy_options::overwrite_existing,
std::fs::path() / boost::fs::unique_path(),
directory iterators etc.
Next, if we take boost::process, for example, we see that it currently
operates only on boost::filesystem. If my application uses c++17 fs, I
have to write something like this:
fs::path f(fs::path in) {
bp::search_path(in.u8string()).wstring();
}
So, mixing pure c++ and boost becomes more complex.
Any ideas how to deal better with such issues on the user side?
What are directions of proper fixing this in boost::process (in case
I'll try to prepare a PR)?
What are boost policies in adopting standard features in general?
-- Egor Pugin
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk