From 42a257e17cf869ffcc6f75e3fdb5ac845a421798 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Mon, 14 Jun 2021 03:59:44 +0300 Subject: [PATCH] Add operator<< for error_condition --- include/boost/system/detail/error_condition.hpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/boost/system/detail/error_condition.hpp b/include/boost/system/detail/error_condition.hpp index 653b812..234ef2b 100644 --- a/include/boost/system/detail/error_condition.hpp +++ b/include/boost/system/detail/error_condition.hpp @@ -219,6 +219,17 @@ public: } #endif + + template + inline friend std::basic_ostream& + operator<< (std::basic_ostream& os, error_condition const & en) + { + { + os << "cond:" << en.category().name() << ':' << en.value(); + } + + return os; + } }; } // namespace system