storage/composite: no "=default" in constructor

Closes https://github.com/MusicPlayerDaemon/MPD/pull/739 (essentially
the same, but with a proper explanation)
This commit is contained in:
Max Kellermann 2020-02-16 19:07:08 +01:00
parent d4a6d647a0
commit 36a678276b
1 changed files with 9 additions and 1 deletions

View File

@ -179,7 +179,15 @@ CompositeStorage::Directory::MapToRelativeUTF8(std::string &buffer,
return false; return false;
} }
CompositeStorage::CompositeStorage() noexcept = default; CompositeStorage::CompositeStorage() noexcept
{
/* note: no "=default" here because members of this class are
allowed to throw during construction according to the C++
standard (e.g. std::map), but we choose to ignore these
exceptions; if construction of std::map goes wrong, MPD has
no chance to work at all, so it's ok to std::terminate() */
}
CompositeStorage::~CompositeStorage() = default; CompositeStorage::~CompositeStorage() = default;
Storage * Storage *