From patchwork Wed Jun 19 16:36:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 1949776 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=TD8LSH8v; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W48RL4dprz20Wb for ; Thu, 20 Jun 2024 02:37:18 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E921B388703B for ; Wed, 19 Jun 2024 16:37:16 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 48DC5388883F for ; Wed, 19 Jun 2024 16:36:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 48DC5388883F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 48DC5388883F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718815001; cv=none; b=Q6Il9V9I/TmdB+kUSQzOCLAvrfl4AKKKq2voxWW1vru/2lHwy79uwTPaLup0NJ498UIx8mA21XkawmcrjgbhPE8M829b1I9TmwGzB5rZxzsXrdBK+L62W1KH84n1qokugeHXD4vFXtU//S5QfjGLFkl5SKK0SyxHAK2tignS3QI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718815001; c=relaxed/simple; bh=47Gyrnxw/cUGbha4y00sGugeMQiqhX9LSYtroT9kZDM=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=wRGL+3C8AnqqUyF3vwb4XDSFuV4bPEle7GIY1uAKGCixgNcFhjpLx6y+BCa87Y4CimMoXuIObNUUg81VcvHNFc8bM55X7Fx8M1hpQhEX7+9fB3qQaN8GEn3AQqpUOj/VEu3YWqpi017E38IrK5xSZOWGOOmAJ1NsAOLI9R6HENA= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1718814993; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U0AlP+/LbBSNqEB4i9kfs9eJiD89SLc4zm2i6pywuZs=; b=TD8LSH8vXe58mHxGM/8KtpJWXVXayxr8mVOI4teTjgvkEan9/B8hZiOkIQQ+Ud7hyxtvEt Z2B2OUn1jrpq/FG0zZ+Z9jvjZUtRjWM7Hby7FYQWLPaJQgzLb5+LQ/BRqBk14t3SvJi4A/ 0tb6nlPM5Do+dF7jWoFlTLtF0+mfmAI= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-224-mXrZfo-ZPfOm4OR9i4HfNw-1; Wed, 19 Jun 2024 12:36:29 -0400 X-MC-Unique: mXrZfo-ZPfOm4OR9i4HfNw-1 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8193619560B0; Wed, 19 Jun 2024 16:36:28 +0000 (UTC) Received: from localhost (unknown [10.42.28.182]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id B3CB11956087; Wed, 19 Jun 2024 16:36:27 +0000 (UTC) From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Consistently indent with tabs Date: Wed, 19 Jun 2024 17:36:06 +0100 Message-ID: <20240619163626.1792045-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, RCVD_IN_SBL_CSS, SPF_HELO_NONE, SPF_NONE, TXREP, T_FILL_THIS_FORM_SHORT, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Whitespace only. Tested x86_64-linux. Pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * include/std/future: Adjust whitespace to use tabs for indentation. --- libstdc++-v3/include/std/future | 328 ++++++++++++++++---------------- 1 file changed, 164 insertions(+), 164 deletions(-) diff --git a/libstdc++-v3/include/std/future b/libstdc++-v3/include/std/future index d7be205af50..6ce7d89ca3f 100644 --- a/libstdc++-v3/include/std/future +++ b/libstdc++-v3/include/std/future @@ -292,7 +292,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { using __allocator_type = __alloc_rebind<_Alloc, _Result_alloc>; - explicit + explicit _Result_alloc(const _Alloc& __a) : _Result<_Res>(), _Alloc(__a) { } @@ -362,9 +362,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } template - future_status - wait_for(const chrono::duration<_Rep, _Period>& __rel) - { + future_status + wait_for(const chrono::duration<_Rep, _Period>& __rel) + { // First, check if the future has been made ready. Use acquire MO // to synchronize with the thread that made it ready. if (_M_status._M_load(memory_order_acquire) == _Status::__ready) @@ -396,9 +396,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } template - future_status - wait_until(const chrono::time_point<_Clock, _Duration>& __abs) - { + future_status + wait_until(const chrono::time_point<_Clock, _Duration>& __abs) + { #if __cplusplus > 201703L static_assert(chrono::is_clock_v<_Clock>); #endif @@ -430,8 +430,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _M_set_result(function<_Ptr_type()> __res, bool __ignore_failure = false) { bool __did_set = false; - // all calls to this function are serialized, - // side-effects of invoking __res only happen once + // all calls to this function are serialized, + // side-effects of invoking __res only happen once call_once(_M_once, &_State_baseV2::_M_do_set, this, std::__addressof(__res), std::__addressof(__did_set)); if (__did_set) @@ -439,7 +439,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _M_status._M_store_notify_all(_Status::__ready, memory_order_release); else if (!__ignore_failure) - __throw_future_error(int(future_errc::promise_already_satisfied)); + __throw_future_error(int(future_errc::promise_already_satisfied)); } // Provide a result to the shared state but delay making it ready @@ -451,12 +451,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { bool __did_set = false; unique_ptr<_Make_ready> __mr{new _Make_ready}; - // all calls to this function are serialized, - // side-effects of invoking __res only happen once + // all calls to this function are serialized, + // side-effects of invoking __res only happen once call_once(_M_once, &_State_baseV2::_M_do_set, this, std::__addressof(__res), std::__addressof(__did_set)); if (!__did_set) - __throw_future_error(int(future_errc::promise_already_satisfied)); + __throw_future_error(int(future_errc::promise_already_satisfied)); __mr->_M_shared_state = std::move(__self); __mr->_M_set(); __mr.release(); @@ -490,41 +490,41 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } template - struct _Setter; + struct _Setter; // set lvalues template - struct _Setter<_Res, _Arg&> - { - // check this is only used by promise::set_value(const R&) - // or promise::set_value(R&) - static_assert(is_same<_Res, _Arg&>::value // promise - || is_same::value, // promise - "Invalid specialisation"); + struct _Setter<_Res, _Arg&> + { + // check this is only used by promise::set_value(const R&) + // or promise::set_value(R&) + static_assert(is_same<_Res, _Arg&>::value // promise + || is_same::value, // promise + "Invalid specialisation"); // Used by std::promise to copy construct the result. - typename promise<_Res>::_Ptr_type operator()() const - { - _M_promise->_M_storage->_M_set(*_M_arg); - return std::move(_M_promise->_M_storage); - } - promise<_Res>* _M_promise; - _Arg* _M_arg; - }; + typename promise<_Res>::_Ptr_type operator()() const + { + _M_promise->_M_storage->_M_set(*_M_arg); + return std::move(_M_promise->_M_storage); + } + promise<_Res>* _M_promise; + _Arg* _M_arg; + }; // set rvalues template - struct _Setter<_Res, _Res&&> - { + struct _Setter<_Res, _Res&&> + { // Used by std::promise to move construct the result. - typename promise<_Res>::_Ptr_type operator()() const - { - _M_promise->_M_storage->_M_set(std::move(*_M_arg)); - return std::move(_M_promise->_M_storage); - } - promise<_Res>* _M_promise; - _Res* _M_arg; - }; + typename promise<_Res>::_Ptr_type operator()() const + { + _M_promise->_M_storage->_M_set(std::move(*_M_arg)); + return std::move(_M_promise->_M_storage); + } + promise<_Res>* _M_promise; + _Res* _M_arg; + }; // set void template @@ -542,35 +542,35 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // set exceptions template - struct _Setter<_Res, __exception_ptr_tag> - { + struct _Setter<_Res, __exception_ptr_tag> + { // Used by std::promise to store an exception as the result. - typename promise<_Res>::_Ptr_type operator()() const noexcept - { - _M_promise->_M_storage->_M_error = *_M_ex; - return std::move(_M_promise->_M_storage); - } + typename promise<_Res>::_Ptr_type operator()() const noexcept + { + _M_promise->_M_storage->_M_error = *_M_ex; + return std::move(_M_promise->_M_storage); + } - promise<_Res>* _M_promise; - exception_ptr* _M_ex; - }; + promise<_Res>* _M_promise; + exception_ptr* _M_ex; + }; template __attribute__((__always_inline__)) - static _Setter<_Res, _Arg&&> - __setter(promise<_Res>* __prom, _Arg&& __arg) noexcept - { - return _Setter<_Res, _Arg&&>{ __prom, std::__addressof(__arg) }; - } + static _Setter<_Res, _Arg&&> + __setter(promise<_Res>* __prom, _Arg&& __arg) noexcept + { + return _Setter<_Res, _Arg&&>{ __prom, std::__addressof(__arg) }; + } template __attribute__((__always_inline__)) - static _Setter<_Res, __exception_ptr_tag> - __setter(exception_ptr& __ex, promise<_Res>* __prom) noexcept - { - __glibcxx_assert(__ex != nullptr); // LWG 2276 - return _Setter<_Res, __exception_ptr_tag>{ __prom, &__ex }; - } + static _Setter<_Res, __exception_ptr_tag> + __setter(exception_ptr& __ex, promise<_Res>* __prom) noexcept + { + __glibcxx_assert(__ex != nullptr); // LWG 2276 + return _Setter<_Res, __exception_ptr_tag>{ __prom, &__ex }; + } template __attribute__((__always_inline__)) @@ -581,24 +581,24 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } template - static void - _S_check(const shared_ptr<_Tp>& __p) - { - if (!static_cast(__p)) - __throw_future_error((int)future_errc::no_state); - } + static void + _S_check(const shared_ptr<_Tp>& __p) + { + if (!static_cast(__p)) + __throw_future_error((int)future_errc::no_state); + } private: // The function invoked with std::call_once(_M_once, ...). void _M_do_set(function<_Ptr_type()>* __f, bool* __did_set) { - _Ptr_type __res = (*__f)(); - // Notify the caller that we did try to set; if we do not throw an - // exception, the caller will be aware that it did set (e.g., see - // _M_set_result). + _Ptr_type __res = (*__f)(); + // Notify the caller that we did try to set; if we do not throw an + // exception, the caller will be aware that it did set (e.g., see + // _M_set_result). *__did_set = true; - _M_result.swap(__res); // nothrow + _M_result.swap(__res); // nothrow } // Wait for completion of async function. @@ -719,49 +719,49 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION void wait() const { - _State_base::_S_check(_M_state); - _M_state->wait(); + _State_base::_S_check(_M_state); + _M_state->wait(); } template - future_status - wait_for(const chrono::duration<_Rep, _Period>& __rel) const - { - _State_base::_S_check(_M_state); - return _M_state->wait_for(__rel); - } + future_status + wait_for(const chrono::duration<_Rep, _Period>& __rel) const + { + _State_base::_S_check(_M_state); + return _M_state->wait_for(__rel); + } template - future_status - wait_until(const chrono::time_point<_Clock, _Duration>& __abs) const - { - _State_base::_S_check(_M_state); - return _M_state->wait_until(__abs); - } + future_status + wait_until(const chrono::time_point<_Clock, _Duration>& __abs) const + { + _State_base::_S_check(_M_state); + return _M_state->wait_until(__abs); + } protected: /// Wait for the state to be ready and rethrow any stored exception __result_type _M_get_result() const { - _State_base::_S_check(_M_state); - _Result_base& __res = _M_state->wait(); - if (!(__res._M_error == nullptr)) - rethrow_exception(__res._M_error); - return static_cast<__result_type>(__res); + _State_base::_S_check(_M_state); + _Result_base& __res = _M_state->wait(); + if (!(__res._M_error == nullptr)) + rethrow_exception(__res._M_error); + return static_cast<__result_type>(__res); } void _M_swap(__basic_future& __that) noexcept { - _M_state.swap(__that._M_state); + _M_state.swap(__that._M_state); } // Construction of a future by promise::get_future() explicit __basic_future(const __state_type& __state) : _M_state(__state) { - _State_base::_S_check(_M_state); - _M_state->_M_set_retrieved_flag(); + _State_base::_S_check(_M_state); + _M_state->_M_set_retrieved_flag(); } // Copy construction from a shared_future @@ -780,9 +780,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION struct _Reset { - explicit _Reset(__basic_future& __fut) noexcept : _M_fut(__fut) { } - ~_Reset() { _M_fut._M_state.reset(); } - __basic_future& _M_fut; + explicit _Reset(__basic_future& __fut) noexcept : _M_fut(__fut) { } + ~_Reset() { _M_fut._M_state.reset(); } + __basic_future& _M_fut; }; }; @@ -801,8 +801,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION friend class promise<_Res>; template friend class packaged_task; template - friend future<__async_result_of<_Fn, _Args...>> - async(launch, _Fn&&, _Args&&...); + friend future<__async_result_of<_Fn, _Args...>> + async(launch, _Fn&&, _Args&&...); typedef __basic_future<_Res> _Base_type; typedef typename _Base_type::__state_type __state_type; @@ -822,16 +822,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION future& operator=(future&& __fut) noexcept { - future(std::move(__fut))._M_swap(*this); - return *this; + future(std::move(__fut))._M_swap(*this); + return *this; } /// Retrieving the value _Res get() { - typename _Base_type::_Reset __reset(*this); - return std::move(this->_M_get_result()._M_value()); + typename _Base_type::_Reset __reset(*this); + return std::move(this->_M_get_result()._M_value()); } shared_future<_Res> share() noexcept; @@ -844,8 +844,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION friend class promise<_Res&>; template friend class packaged_task; template - friend future<__async_result_of<_Fn, _Args...>> - async(launch, _Fn&&, _Args&&...); + friend future<__async_result_of<_Fn, _Args...>> + async(launch, _Fn&&, _Args&&...); typedef __basic_future<_Res&> _Base_type; typedef typename _Base_type::__state_type __state_type; @@ -865,16 +865,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION future& operator=(future&& __fut) noexcept { - future(std::move(__fut))._M_swap(*this); - return *this; + future(std::move(__fut))._M_swap(*this); + return *this; } /// Retrieving the value _Res& get() { - typename _Base_type::_Reset __reset(*this); - return this->_M_get_result()._M_get(); + typename _Base_type::_Reset __reset(*this); + return this->_M_get_result()._M_get(); } shared_future<_Res&> share() noexcept; @@ -887,8 +887,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION friend class promise; template friend class packaged_task; template - friend future<__async_result_of<_Fn, _Args...>> - async(launch, _Fn&&, _Args&&...); + friend future<__async_result_of<_Fn, _Args...>> + async(launch, _Fn&&, _Args&&...); typedef __basic_future _Base_type; typedef typename _Base_type::__state_type __state_type; @@ -908,16 +908,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION future& operator=(future&& __fut) noexcept { - future(std::move(__fut))._M_swap(*this); - return *this; + future(std::move(__fut))._M_swap(*this); + return *this; } /// Retrieving the value void get() { - typename _Base_type::_Reset __reset(*this); - this->_M_get_result(); + typename _Base_type::_Reset __reset(*this); + this->_M_get_result(); } shared_future share() noexcept; @@ -955,14 +955,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION shared_future& operator=(const shared_future& __sf) noexcept { - shared_future(__sf)._M_swap(*this); - return *this; + shared_future(__sf)._M_swap(*this); + return *this; } shared_future& operator=(shared_future&& __sf) noexcept { - shared_future(std::move(__sf))._M_swap(*this); - return *this; + shared_future(std::move(__sf))._M_swap(*this); + return *this; } /// Retrieving the value @@ -994,14 +994,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION shared_future& operator=(const shared_future& __sf) { - shared_future(__sf)._M_swap(*this); - return *this; + shared_future(__sf)._M_swap(*this); + return *this; } shared_future& operator=(shared_future&& __sf) noexcept { - shared_future(std::move(__sf))._M_swap(*this); - return *this; + shared_future(std::move(__sf))._M_swap(*this); + return *this; } /// Retrieving the value @@ -1033,14 +1033,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION shared_future& operator=(const shared_future& __sf) { - shared_future(__sf)._M_swap(*this); - return *this; + shared_future(__sf)._M_swap(*this); + return *this; } shared_future& operator=(shared_future&& __sf) noexcept { - shared_future(std::move(__sf))._M_swap(*this); - return *this; + shared_future(std::move(__sf))._M_swap(*this); + return *this; } // Retrieving the value @@ -1115,31 +1115,31 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { } template - promise(allocator_arg_t, const _Allocator& __a) - : _M_future(std::allocate_shared<_State>(__a)), + promise(allocator_arg_t, const _Allocator& __a) + : _M_future(std::allocate_shared<_State>(__a)), _M_storage(__future_base::_S_allocate_result<_Res>(__a)) - { } + { } template - promise(allocator_arg_t, const _Allocator&, promise&& __rhs) - : _M_future(std::move(__rhs._M_future)), + promise(allocator_arg_t, const _Allocator&, promise&& __rhs) + : _M_future(std::move(__rhs._M_future)), _M_storage(std::move(__rhs._M_storage)) - { } + { } promise(const promise&) = delete; ~promise() { - if (static_cast(_M_future) && !_M_future.unique()) - _M_future->_M_break_promise(std::move(_M_storage)); + if (static_cast(_M_future) && !_M_future.unique()) + _M_future->_M_break_promise(std::move(_M_storage)); } // Assignment promise& operator=(promise&& __rhs) noexcept { - promise(std::move(__rhs)).swap(*this); - return *this; + promise(std::move(__rhs)).swap(*this); + return *this; } promise& operator=(const promise&) = delete; @@ -1147,8 +1147,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION void swap(promise& __rhs) noexcept { - _M_future.swap(__rhs._M_future); - _M_storage.swap(__rhs._M_storage); + _M_future.swap(__rhs._M_future); + _M_storage.swap(__rhs._M_storage); } // Retrieving the result @@ -1234,31 +1234,31 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { } template - promise(allocator_arg_t, const _Allocator& __a) - : _M_future(std::allocate_shared<_State>(__a)), + promise(allocator_arg_t, const _Allocator& __a) + : _M_future(std::allocate_shared<_State>(__a)), _M_storage(__future_base::_S_allocate_result<_Res&>(__a)) - { } + { } template - promise(allocator_arg_t, const _Allocator&, promise&& __rhs) - : _M_future(std::move(__rhs._M_future)), + promise(allocator_arg_t, const _Allocator&, promise&& __rhs) + : _M_future(std::move(__rhs._M_future)), _M_storage(std::move(__rhs._M_storage)) - { } + { } promise(const promise&) = delete; ~promise() { - if (static_cast(_M_future) && !_M_future.unique()) - _M_future->_M_break_promise(std::move(_M_storage)); + if (static_cast(_M_future) && !_M_future.unique()) + _M_future->_M_break_promise(std::move(_M_storage)); } // Assignment promise& operator=(promise&& __rhs) noexcept { - promise(std::move(__rhs)).swap(*this); - return *this; + promise(std::move(__rhs)).swap(*this); + return *this; } promise& operator=(const promise&) = delete; @@ -1266,8 +1266,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION void swap(promise& __rhs) noexcept { - _M_future.swap(__rhs._M_future); - _M_storage.swap(__rhs._M_storage); + _M_future.swap(__rhs._M_future); + _M_storage.swap(__rhs._M_storage); } // Retrieving the result @@ -1332,33 +1332,33 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { } template - promise(allocator_arg_t, const _Allocator& __a) - : _M_future(std::allocate_shared<_State>(__a)), + promise(allocator_arg_t, const _Allocator& __a) + : _M_future(std::allocate_shared<_State>(__a)), _M_storage(__future_base::_S_allocate_result(__a)) - { } + { } // _GLIBCXX_RESOLVE_LIB_DEFECTS // 2095. missing constructors needed for uses-allocator construction template - promise(allocator_arg_t, const _Allocator&, promise&& __rhs) - : _M_future(std::move(__rhs._M_future)), + promise(allocator_arg_t, const _Allocator&, promise&& __rhs) + : _M_future(std::move(__rhs._M_future)), _M_storage(std::move(__rhs._M_storage)) - { } + { } promise(const promise&) = delete; ~promise() { - if (static_cast(_M_future) && !_M_future.unique()) - _M_future->_M_break_promise(std::move(_M_storage)); + if (static_cast(_M_future) && !_M_future.unique()) + _M_future->_M_break_promise(std::move(_M_storage)); } // Assignment promise& operator=(promise&& __rhs) noexcept { - promise(std::move(__rhs)).swap(*this); - return *this; + promise(std::move(__rhs)).swap(*this); + return *this; } promise& operator=(const promise&) = delete; @@ -1366,8 +1366,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION void swap(promise& __rhs) noexcept { - _M_future.swap(__rhs._M_future); - _M_storage.swap(__rhs._M_storage); + _M_future.swap(__rhs._M_future); + _M_storage.swap(__rhs._M_storage); } // Retrieving the result @@ -1596,7 +1596,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ~packaged_task() { - if (static_cast(_M_state) && !_M_state.unique()) + if (static_cast(_M_state) && !_M_state.unique()) _M_state->_M_break_promise(std::move(_M_state->_M_result)); } @@ -1709,7 +1709,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // result in _M_result, swaps that with the base _M_result and makes // the state ready. Tell _M_set_result to ignore failure so all later // calls do nothing. - _M_set_result(_S_task_setter(_M_result, _M_fn), true); + _M_set_result(_S_task_setter(_M_result, _M_fn), true); } // Caller should check whether the state is ready first, because this