From 39a19f3c90d781d493111a17bd357c5629eb48f9 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Wed, 16 Jun 2021 03:06:11 +0300 Subject: [PATCH] Add constexpr to op== against error code enums --- include/boost/system/detail/error_code.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/boost/system/detail/error_code.hpp b/include/boost/system/detail/error_code.hpp index b934a8d..5d263b0 100644 --- a/include/boost/system/detail/error_code.hpp +++ b/include/boost/system/detail/error_code.hpp @@ -393,25 +393,25 @@ public: // template::value>::type> - inline friend bool operator==( error_code const & lhs, E rhs ) BOOST_NOEXCEPT + BOOST_SYSTEM_CONSTEXPR inline friend bool operator==( error_code const & lhs, E rhs ) BOOST_NOEXCEPT { return lhs == make_error_code( rhs ); } template::value>::type> - inline friend bool operator==( E lhs, error_code const & rhs ) BOOST_NOEXCEPT + BOOST_SYSTEM_CONSTEXPR inline friend bool operator==( E lhs, error_code const & rhs ) BOOST_NOEXCEPT { return make_error_code( lhs ) == rhs; } template::value>::type> - inline friend bool operator!=( error_code const & lhs, E rhs ) BOOST_NOEXCEPT + BOOST_SYSTEM_CONSTEXPR inline friend bool operator!=( error_code const & lhs, E rhs ) BOOST_NOEXCEPT { return !( lhs == rhs ); } template::value>::type> - inline friend bool operator!=( E lhs, error_code const & rhs ) BOOST_NOEXCEPT + BOOST_SYSTEM_CONSTEXPR inline friend bool operator!=( E lhs, error_code const & rhs ) BOOST_NOEXCEPT { return !( lhs == rhs ); }