On Fri, 5 Nov 2021 at 03:58, Thiago Macieira via Std-Discussion <std-discussion@lists.isocpp.org> wrote:
On Thursday, 4 November 2021 18:58:57 PDT Andrey Semashev via Std-Discussion
> That's not a rationale, it's a consequence of the specification. I'm
> interested in the motivation for the specification being written this
> way (if it was written so intentionally, with respect to the case I
> described).

It seems that operator/ is implemented like the "cd" command, not a string

Think of this:
$ cd /usr
$ cd /bin
$ pwd

You don't expect it to show /usr/bin (whether /bin is a symlink to /usr/bin or
not is irrelevant here).

I agree with you it's surprising at first sight because

        "//net/foo" + "/bar"

makes it a subdir of //net/foo.

But it's not meant to be like string concatenation.

The only prior art of operator/ that I know of is in the Meson buildsystem and
it behaves exactly like fs::path. See

For another, Python pathlib (in the standard library; https://docs.python.org/3/library/pathlib.html) behaves exactly the same; on Linux:

>>> Path('//net/foo') / Path('/bar')

and on Windows,

>>> Path('//net/foo') / Path('/bar')