PluginUnavailable: perfect forwarding in the constructor

This commit is contained in:
Max Kellermann 2019-03-29 17:17:45 +01:00
parent b1b630a4cc
commit 508e522188

View File

@ -29,8 +29,9 @@
*/
class PluginUnavailable final : public std::runtime_error {
public:
explicit PluginUnavailable(const char *msg)
:std::runtime_error(msg) {}
template<typename M>
explicit PluginUnavailable(M &&msg) noexcept
:std::runtime_error(std::forward<M>(msg)) {}
};
#endif