From eb94f409d59cb306731d51dcfe6edd9611320384 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 25 Mar 2019 19:01:27 +0100 Subject: [PATCH] protocol/Ack: perfect forwarding in the ProtocolError constructor --- src/protocol/Ack.hxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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;