diff options
author | Max Kellermann <max@musicpd.org> | 2018-07-17 17:01:02 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2018-07-17 18:33:32 +0200 |
commit | 99d5b616981107f0cb32f9bcc9e29ff92855c78a (patch) | |
tree | 5fbc013510b82fc932d4045ede572774a04edd84 /src/fs/Path.hxx | |
parent | 79e89eb23b554248e4b86631109ae551df6c8d48 (diff) |
fs/Path: add operator/(Path,Path)
Modeled after std::filesystem::operator/() from C++17.
Diffstat (limited to 'src/fs/Path.hxx')
-rw-r--r-- | src/fs/Path.hxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/fs/Path.hxx b/src/fs/Path.hxx index 2e7393eab..2415923d0 100644 --- a/src/fs/Path.hxx +++ b/src/fs/Path.hxx @@ -1,5 +1,5 @@ /* - * Copyright 2003-2017 The Music Player Daemon Project + * Copyright 2003-2018 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify @@ -169,4 +169,12 @@ public: const_pointer_type GetSuffix() const noexcept; }; +/** + * Concatenate two path components using the directory separator. + * + * Wrapper for AllocatedPath::Build(). + */ +AllocatedPath +operator/(Path a, Path b) noexcept; + #endif |