From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 E70073858C56 for ; Fri, 7 Oct 2022 11:57:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E70073858C56 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665143823; 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=c30qqT4gCqSaqCWIXlzbD9NlqtsYgpZnqqtPrwyPZnk=; b=V+qf+Ira4FbXq84PxCnrRjcQRBuTt0ZgZpi1qmd2qppc076WinTJWr0aF1DgjDvGXyNz9P MVrGK5kA3FHItitexy8MnSBjjniESNWUIcMrol54hWlE5iZqLL6MyjxKP/62VlH4AO8QtC BtlDZDB21l2CeDr711KPfsbQ0P9fqtA= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-16-A-aBWZrRNmqNYDBH3xPg9A-1; Fri, 07 Oct 2022 07:57:02 -0400 X-MC-Unique: A-aBWZrRNmqNYDBH3xPg9A-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D3DCC185A7A8; Fri, 7 Oct 2022 11:57:01 +0000 (UTC) Received: from localhost (unknown [10.33.36.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9B1A72166B35; Fri, 7 Oct 2022 11:57:01 +0000 (UTC) From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Shuffle header dependencies of Date: Fri, 7 Oct 2022 12:57:01 +0100 Message-Id: <20221007115701.1226696-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.0 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,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Tested x86_64-linux, Pushed to trunk. -- >8 -- The header is needed by std::function to use placement new, so include it in instead of in . libstdc++-v3/ChangeLog: * include/bits/std_function.h: Include but do not include . * include/std/functional: Do not include . --- libstdc++-v3/include/bits/std_function.h | 10 +++++----- libstdc++-v3/include/std/functional | 7 +++---- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/libstdc++-v3/include/bits/std_function.h b/libstdc++-v3/include/bits/std_function.h index f5423a3a5c7..8ab32a6855e 100644 --- a/libstdc++-v3/include/bits/std_function.h +++ b/libstdc++-v3/include/bits/std_function.h @@ -36,11 +36,11 @@ # include #else -#include -#include -#include -#include -#include +#include // placement new +#include // typeid +#include // __invoke_r +#include // ref wrapper, _Maybe_unary_or_binary_function +#include // __throw_bad_function_call namespace std _GLIBCXX_VISIBILITY(default) { diff --git a/libstdc++-v3/include/std/functional b/libstdc++-v3/include/std/functional index adf9cb1c546..d22acaa3cb8 100644 --- a/libstdc++-v3/include/std/functional +++ b/libstdc++-v3/include/std/functional @@ -46,11 +46,10 @@ #pragma GCC system_header #include -#include +#include // std::equal_to, std::unary_function etc. #if __cplusplus >= 201103L -#include #include #include #include @@ -67,8 +66,8 @@ # endif # include // std::search #endif -#if __cplusplus > 201703L -# include +#if __cplusplus >= 202002L +# include // std::identity, ranges::equal_to etc. # include #endif #if __cplusplus > 202002L && _GLIBCXX_HOSTED -- 2.37.3