Created on 2018-04-06.00:00:00 last changed 79 months ago
Proposed resolution:
This wording is relative to N4741.
Edit [fs.path.decompose] as indicated:
path filename() const;-6- Returns: relative_path().empty() ? path() : *--end().
[Example:path("/foo/bar.txt").filename(); // yields "bar.txt" path("/foo/bar").filename(); // yields "bar" path("/foo/bar/").filename(); // yields "" path("/").filename(); // yields ""path("//host").filename(); // yields ""path(".").filename(); // yields "." path("..").filename(); // yields ".."— end example]
[ 2018-06-18 after reflector discussion ]
Priority set to 3
[ 2018-04-10, Jonathan comments and provides revised wording ]
Based on the reflector discussion I'd like to change the P/R to Billy's suggestion of simply removing that line from the example.
The example in [fs.path.decompose] p7 includes:
path("//host").filename(); // yields ""
This result isn't guaranteed, it depends whether the implementation interprets "//host" as a root-name or as a root-directory (with a redundant directory-separator) followed by the filename "host".
The example should make it clear that this interpretation is allowed.Previous resolution [SUPERSEDED]:
This wording is relative to N4727.
Edit [fs.path.decompose] as indicated:
path filename() const;-6- Returns: relative_path().empty() ? path() : *--end().
[Example:path("/foo/bar.txt").filename(); // yields "bar.txt" path("/foo/bar").filename(); // yields "bar" path("/foo/bar/").filename(); // yields "" path("/").filename(); // yields "" path("//host").filename(); // yields "" or "host" path(".").filename(); // yields "." path("..").filename(); // yields ".."— end example]
History | |||
---|---|---|---|
Date | User | Action | Args |
2018-06-19 05:49:11 | admin | set | messages: + msg9942 |
2018-04-18 17:24:32 | admin | set | messages: + msg9816 |
2018-04-08 15:39:55 | admin | set | messages: + msg9812 |
2018-04-06 00:00:00 | admin | create |