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.