This commit is contained in:
Timur A. Fatkhullin
2024-11-09 03:15:59 +03:00
parent 8d6e1bb59c
commit afd1a917b4
5 changed files with 82 additions and 163 deletions

View File

@@ -757,6 +757,15 @@ public:
return _shutdownType;
}
template <typename OutputItT, typename FormatT = std::string_view>
static void formatError(std::error_code err,
OutputItT out_iter,
FormatT fmt = "{} (Err category: {}) (Err msg: {})")
{
std::format_to(out_iter, fmt, err.value(), err.category().name(), err.message());
}
protected:
static constexpr netservice_ident_t _ident =
std::derived_from<socket_t, asio::basic_stream_socket<typename socket_t::protocol_type>>