Add some more SourcePath docs

This commit is contained in:
Eelco Dolstra 2023-04-24 13:37:51 +02:00
parent ad57cff9bc
commit 5d3f6dbf59

View file

@ -125,9 +125,17 @@ struct SourcePath
std::string to_string() const std::string to_string() const
{ return path.abs(); } { return path.abs(); }
/**
* Append a `CanonPath` to this path.
*/
SourcePath operator + (const CanonPath & x) const SourcePath operator + (const CanonPath & x) const
{ return {path + x}; } { return {path + x}; }
/**
* Append a single component `c` to this path. `c` must not
* contain a slash. A slash is implicitly added between this path
* and `c`.
*/
SourcePath operator + (std::string_view c) const SourcePath operator + (std::string_view c) const
{ return {path + c}; } { return {path + c}; }