From eb24936cfc9dd9be0c90acb91c1dd2768d4a156f Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sun, 5 Jan 2020 22:17:42 +0800 Subject: [PATCH] crimson: do not use auto in param list of function prototype src/crimson/net/Socket.cc:114:57: error: 'auto' not allowed in function prototype static inline seastar::future<> close_and_handle_errors(auto& out) { ^~~~ Signed-off-by: Kefu Chai --- src/crimson/net/Socket.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/crimson/net/Socket.cc b/src/crimson/net/Socket.cc index 4effb94ee8e..86b5f6752cc 100644 --- a/src/crimson/net/Socket.cc +++ b/src/crimson/net/Socket.cc @@ -111,7 +111,9 @@ void Socket::shutdown() { socket.shutdown_output(); } -static inline seastar::future<> close_and_handle_errors(auto& out) { +static inline seastar::future<> +close_and_handle_errors(seastar::output_stream& out) +{ return out.close().handle_exception_type([] (const std::system_error& e) { if (e.code() != error::broken_pipe && e.code() != error::connection_reset) { -- 2.39.5