[filesystem] and C++17 std::filesystem

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[filesystem] and C++17 std::filesystem

Boost - Dev mailing list
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

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: [filesystem] and C++17 std::filesystem

Boost - Dev mailing list
On Mon, May 7, 2018 at 6:23 PM, Egor Pugin via Boost <[hidden email]>
wrote:

> 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).
>
>
I would first recommend you open a GitHub issue for boost::filesystem here:

https://github.com/boostorg/filesystem

To the filesystem maintainer: the backlog on pull requests on filesystem is
up to 27.


> 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.
>
>
I would first recommend you open a GitHub issue for boost::system here:

https://github.com/boostorg/system


> 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?
>
>
I think making them compatible is good thing, assuming we don't have to
break backwards compatibility.


> --
> Egor Pugin
>

Thanks,

Jim

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost