Bug ID: 92064
           Summary: operator/ not resolved for directory_entry and const
           Product: gcc
           Version: 9.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot
          Reporter: penkrat8 at gmail dot com
  Target Milestone: ---

Created attachment 47020

Both std::filesystem::directory_entry and const char* can be implicitly
converted to std::filesystem::path, however operator/ for these types doesn't
get resolved.

test.cpp: In function ‘int main()’:
test.cpp:6:26: error: no match for ‘operator/’ (operand types are ‘const
std::filesystem::__cxx11::directory_entry’ and ‘const char [5]’)
    6 |         std::cout << dir / "file";
      |                      ~~~ ^ ~~~~~~
      |                      |     |
      |                      |     const char [5]
      |                      const std::filesystem::__cxx11::directory_entry

There is no such problem in gcc 8.2.0 so it's a regression between 8.2.0 and

Reply via email to