This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/85247] New: Filesystem filename() wrong result for host-like path
- From: "ixsci at yandex dot ru" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 06 Apr 2018 08:04:52 +0000
- Subject: [Bug c++/85247] New: Filesystem filename() wrong result for host-like path
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85247
Bug ID: 85247
Summary: Filesystem filename() wrong result for host-like path
Product: gcc
Version: 8.0.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ixsci at yandex dot ru
Target Milestone: ---
Here is a small example which is using a host-like path:
#include <iostream>
#include <filesystem>
namespace fs = std::filesystem;
int main()
{
std::cout << fs::path("//host").filename() << '\n';
}
Which according to the Standard ([fs.path.decompose]p7) should display "" but
it displays "host" instead. Tested on Wandbox with gcc HEAD.