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 { class PluginUnavailable final : public std::runtime_error {
public: public:
explicit PluginUnavailable(const char *msg) template<typename M>
:std::runtime_error(msg) {} explicit PluginUnavailable(M &&msg) noexcept
:std::runtime_error(std::forward<M>(msg)) {}
}; };
#endif #endif