db/simple/Song: add template constructor

This commit is contained in:
Max Kellermann 2019-09-04 11:32:42 +02:00
parent cbe7d052e8
commit 6a13847287

View File

@ -93,6 +93,10 @@ struct Song {
*/ */
std::string uri; std::string uri;
template<typename U>
Song(U &&_uri, Directory &_parent) noexcept
:parent(_parent), uri(std::forward<U>(_uri)) {}
Song(StringView _uri, Directory &parent) noexcept; Song(StringView _uri, Directory &parent) noexcept;
static SongPtr NewFrom(DetachedSong &&other, Directory &parent) noexcept; static SongPtr NewFrom(DetachedSong &&other, Directory &parent) noexcept;