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
          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.

Reply via email to