https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92064
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2019-10-11 Summary|operator/ not resolved for |[DR 3171] operator/ not |directory_entry and const |resolved for |char* |directory_entry and const | |char* Ever confirmed|0 |1 --- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- I believe this is the correct behaviour. https://wg21.link/lwg3065 changed operator/ to be a hidden friend, which means it can only be found by ADL when at least one argument is a path. in the expression `dir / "file"` neither argument has type path, so the operator is not found by ADL. You would need to do: dir.path() / "file" or: static_cast<const path&>(dir) / "file" However, as https://wg21.link/lwg3171 points out, such changes to path can have undesirable consequences for directory_entry. I will ask for LWG 3171 to also consider operator/ and the comparison operators.