boostorg / boostorg/gil

Deprecate I/O interface using boost::filesystem::path

Open
#222 2 comments 0 reactions 1 assignee Claimed by @mloskot View on GitHub
cat/deprecation ext/io good-first-issue
Dominant language
C++
Stars
199
Forks
171
Avg merge
1d 14h
Merged PRs (30d)
10

Description

TL;TR: We are planning to deprecate functions accepting `boost::filesystem::path` and replace with C++17 `std::filesystem`

## What

Currently, Boost.Filesystem support is optional, guarded with macro [BOOST_GIL_IO_ADD_FS_PATH_SUPPORT](https://github.com/search?utf8=%E2%9C%93&q=BOOST_GIL_IO_ADD_FS_PATH_SUPPORT+repo%3Aboostorg%2Fgil+extension%3Ahpp+language%3AC%2B%2B+language%3AC%2B%2B&type=Code&ref=advsearch&l=C%2B%2B&l=C%2B%2B) checked in number of the I/O extension headers.

It is reasonable to replace the `boost::filesystem` with `std::filesystem` whenever GIL code is compiled using C++17,
unless user explicitly desires to use Boost.Filesystem via an appropriate `#define`.

## Why

1. We, @stefanseefeld & @mloskot, don't see any added value in function overloads such as `make_dynamic_image_reader` that use `filesystem::path` over just passing `std::string` or `char const*` and leaving the conversion from the `path` to `string` to the converting constructors or user.

2. Avoid Boost.Filesystem as direct and mandatory dependency.

Briefly, we considered automatically replacing `boost::filesystem` with `std::filesystem`, depending on compiler and target C++ version, but we quickly landed at the point 1. Plus, the `` detection heuristics would not be as straightforward as one may expect.

## When

As soon as possible - along with complete C++11 switch

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.