From 311df261564281c9f54e253a82b92cb6578d47d9 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Fri, 12 Jan 2018 15:04:30 -0800 Subject: [PATCH] ircd: Expose utilities for boost errors. --- include/ircd/asio.h | 10 ---------- include/ircd/ios.h | 8 ++++++++ 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/include/ircd/asio.h b/include/ircd/asio.h index e5c428e2b..61e806022 100644 --- a/include/ircd/asio.h +++ b/include/ircd/asio.h @@ -43,16 +43,6 @@ #include #include -namespace ircd -{ - std::exception_ptr make_eptr(const boost::system::error_code &ec); - - string_view string(const mutable_buffer &, const boost::system::error_code &); - string_view string(const mutable_buffer &, const boost::system::system_error &); - std::string string(const boost::system::error_code &); - std::string string(const boost::system::system_error &); -} - struct ircd::strand :asio::io_service::strand { diff --git a/include/ircd/ios.h b/include/ircd/ios.h index 52beb5dc7..6955929a9 100644 --- a/include/ircd/ios.h +++ b/include/ircd/ios.h @@ -30,6 +30,7 @@ namespace boost::system { struct error_code; + struct system_error; namespace errc {} } @@ -63,6 +64,13 @@ namespace ircd void post(std::function); void dispatch(std::function); + + // Forward utilities for boost errors + std::exception_ptr make_eptr(const boost::system::error_code &ec); + string_view string(const mutable_buffer &, const boost::system::error_code &); + string_view string(const mutable_buffer &, const boost::system::system_error &); + std::string string(const boost::system::error_code &); + std::string string(const boost::system::system_error &); } inline void