The append operations use operator/= to denote their semantic effect of appending preferred-separator when needed.
path& operator/=(const path& p);
Effects: If p.is_absolute() || (p.has_root_name() && p.root_name() != root_name()), then operator=(p).
Otherwise, modifies *this as if by these steps:
If p.has_root_directory(), then removes any root directory and relative path from the generic format pathname. Otherwise, if !has_root_directory() && is_absolute() is true or if has_filename() is true, then appends path::preferred_separator to the generic format pathname.
Then appends the native format pathname of p, omitting any root-name from its generic format pathname, to the native format pathname.
[ Example: Even if //host is interpreted as a root-name, both of the paths path("//host")/"foo" and path("//host/")/"foo" equal "//host/foo".
Expression examples:
path("foo") / ""; path("foo") / "/bar"; path("foo") / "c:/bar"; path("foo") / "c:"; path("c:") / ""; path("c:foo") / "/bar"; path("c:foo") / "c:bar";
— end example ]
template <class Source> path& operator/=(const Source& source); template <class Source> path& append(const Source& source);
Effects: Equivalent to: return operator/=(path(source));
template <class InputIterator> path& append(InputIterator first, InputIterator last);
Effects: Equivalent to: return operator/=(path(first, last));
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4