protocol/Ack: perfect forwarding in the ProtocolError constructor

This commit is contained in:
Max Kellermann 2019-03-25 19:01:27 +01:00
parent 93d91936b5
commit eb94f409d5

View File

@ -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<typename M>
ProtocolError(enum ack _code, M &&msg)
:std::runtime_error(std::forward<M>(msg)), code(_code) {}
enum ack GetCode() const {
return code;