[libcxx-commits] [PATCH] D98109: [libcxx] Make path::absolute return paths with separators in preferred form

Marek Kurdej via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Mar 8 00:33:07 PST 2021


curdeius added a comment.

I already wanted to hit the big green button when I have got a second thought. http://eel.is/c++draft/fs.op.absolute doesn't seem, to my reading, to mandate returning a path with preferred separators. I agree that `current_path` returns a path in native format, but I don't see why`absolute` should force preferred separators. A user passing a path with non-native separators to this function may well know what they are doing and not be willing to pay the cost of transforming separators to the preferred form, however slight this cost might be. What's your opinion on this?

On a different note, I think I'll have a closer look at some of the FS tests... The synopses in tests are hum, weird e.g. https://github.com/llvm/llvm-project/blob/main/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.absolute/absolute.pass.cpp#L13.
Also, you maybe know, why do we test only non-throwing version of `absolute`, cf. https://github.com/llvm/llvm-project/blob/main/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.absolute/absolute.pass.cpp#L50? I believe it's the case for some other functions too.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98109/new/

https://reviews.llvm.org/D98109



More information about the libcxx-commits mailing list