diff --git a/src/protocol/Ack.hxx b/src/protocol/Ack.hxx index 796badddb..6a1ee8129 100644 --- a/src/protocol/Ack.hxx +++ b/src/protocol/Ack.hxx @@ -48,8 +48,9 @@ class ProtocolError : public std::runtime_error { enum ack code; public: - ProtocolError(enum ack _code, const char *msg) - :std::runtime_error(msg), code(_code) {} + template + ProtocolError(enum ack _code, M &&msg) + :std::runtime_error(std::forward(msg)), code(_code) {} enum ack GetCode() const { return code;