Andrey Semashev 5cefe7890f Remove path converting constructors from types convertible to path sources.
This causes ambiguities in users' code where the previously added conversion
from user-defined types that have a conversion to one of the path source
types:

  struct my_class
  {
    operator std::string() const;
  };

  std::string to_string(std::string const&);
  std::string to_string(boost::filesystem::path const&);

  to_string(my_class());

The above call is ambiguous as the conversion operator in my_class and
a converting constructor in boost::filesystem::path from my_class are
both available and have equivalent ranks.

Removing the conversion constructors from boost::filesystem::path
means users will have to explicitly cast their types to one of the
path source types before constructing path.

In order to preserve backward compatibility with operator== and operator!=
for paths that also accepted source types (path::string_type,
const path::value_type*), we have to update path::compare and comparison
operators to accept types that are convertible to source types.

Fixes https://github.com/boostorg/filesystem/issues/273.
2023-02-04 19:55:17 +03:00
2022-12-18 02:14:16 +03:00
2021-01-26 15:57:18 -05:00
2014-07-23 10:11:34 -04:00
2022-12-18 02:14:16 +03:00
2021-09-15 22:11:51 +03:00

Boost.Filesystem

Boost.Filesystem, part of collection of the Boost C++ Libraries, provides facilities to manipulate files and directories, and the paths that identify them.

Directories

  • doc - Documentation sources
  • include - Interface headers of Boost.Filesystem
  • src - Compilable source files of Boost.Filesystem
  • test - Boost.Filesystem unit tests
  • example - Boost.Filesystem usage examples

More information

Build status

Branch GitHub Actions AppVeyor Test Matrix Dependencies
master GitHub Actions AppVeyor Tests Dependencies
develop GitHub Actions AppVeyor Tests Dependencies

License

Distributed under the Boost Software License, Version 1.0.

Description
Boost.org filesystem module
Readme 15 MiB
Languages
C++ 98.4%
CMake 1.5%