libstdc++: Implement LWG 3070 in path::lexically_relative
authorJonathan Wakely <jwakely@redhat.com>
Fri, 15 Nov 2019 19:58:15 +0000 (19:58 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Fri, 15 Nov 2019 19:58:15 +0000 (19:58 +0000)
commit01eb211bade92275e39254cc5a0dc21834dbcac4
tree5bc1f1bc46184968c816940f078b28e0f8840525
parent838fd641a6ffb7e4734321de14385bece3e4506b
libstdc++: Implement LWG 3070 in path::lexically_relative

* src/c++17/fs_path.cc [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
(is_disk_designator): New helper function.
(path::_Parser::root_path()): Use is_disk_designator.
(path::lexically_relative(const path&)): Implement resolution of
LWG 3070.
* testsuite/27_io/filesystem/path/generation/relative.cc: Check with
path components that look like a root-name.

From-SVN: r278313
libstdc++-v3/ChangeLog
libstdc++-v3/src/c++17/fs_path.cc
libstdc++-v3/testsuite/27_io/filesystem/path/generation/relative.cc