Commit eb94f409 authored by Max Kellermann's avatar Max Kellermann

protocol/Ack: perfect forwarding in the ProtocolError constructor

parent 93d91936
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment