From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id 2ED173842AE3; Thu, 7 Jul 2022 23:33:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2ED173842AE3 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jonathan Wakely To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r11-10134] libstdc++: Add noexcept to std::launch operators X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/releases/gcc-11 X-Git-Oldrev: c8f091982c748a8a180e9e2b24740f9a388f63da X-Git-Newrev: 7f66dfbe4cba07458e224486e0dd6ff1ece321d3 Message-Id: <20220707233336.2ED173842AE3@sourceware.org> Date: Thu, 7 Jul 2022 23:33:36 +0000 (GMT) X-BeenThere: libstdc++-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jul 2022 23:33:36 -0000 https://gcc.gnu.org/g:7f66dfbe4cba07458e224486e0dd6ff1ece321d3 commit r11-10134-g7f66dfbe4cba07458e224486e0dd6ff1ece321d3 Author: Jonathan Wakely Date: Thu May 12 19:33:58 2022 +0100 libstdc++: Add noexcept to std::launch operators libstdc++-v3/ChangeLog: * include/std/future (launch): Make operators noexcept. (cherry picked from commit 8659bcd6b7e692a9a516cd57bb19303a2efe78ba) Diff: --- libstdc++-v3/include/std/future | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libstdc++-v3/include/std/future b/libstdc++-v3/include/std/future index f5d8da472f5..88478860c7d 100644 --- a/libstdc++-v3/include/std/future +++ b/libstdc++-v3/include/std/future @@ -139,34 +139,34 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION deferred = 2 }; - constexpr launch operator&(launch __x, launch __y) + constexpr launch operator&(launch __x, launch __y) noexcept { return static_cast( static_cast(__x) & static_cast(__y)); } - constexpr launch operator|(launch __x, launch __y) + constexpr launch operator|(launch __x, launch __y) noexcept { return static_cast( static_cast(__x) | static_cast(__y)); } - constexpr launch operator^(launch __x, launch __y) + constexpr launch operator^(launch __x, launch __y) noexcept { return static_cast( static_cast(__x) ^ static_cast(__y)); } - constexpr launch operator~(launch __x) + constexpr launch operator~(launch __x) noexcept { return static_cast(~static_cast(__x)); } - inline launch& operator&=(launch& __x, launch __y) + inline launch& operator&=(launch& __x, launch __y) noexcept { return __x = __x & __y; } - inline launch& operator|=(launch& __x, launch __y) + inline launch& operator|=(launch& __x, launch __y) noexcept { return __x = __x | __y; } - inline launch& operator^=(launch& __x, launch __y) + inline launch& operator^=(launch& __x, launch __y) noexcept { return __x = __x ^ __y; } /// Status code for futures