This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
This integrates string_view with experimental::filesystem::path, which is not actually in the TS, but is required for std::filesystem. I've made it work with experimental::string_view in C++14 mode, and with std::string_view in C++17 mode. I suppose I could have made it work with either in C++17 mode, but that would be a bit more complicated. * include/experimental/bits/fs_path.h (__is_path_src) (_S_range_begin, _S_range_end): Overload to treat string_view as a Source object. (path::operator+=, path::compare): Overload for basic_string_view. * testsuite/experimental/filesystem/path/construct/string_view.cc: New test. * testsuite/experimental/filesystem/path/construct/ string_view_cxx17.cc: New test. Tested x86_64-linux, committed to trunk.
Attachment:
patch.txt
Description: Text document
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |