From patchwork Wed Sep 21 14:03:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 1342 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5044:0:0:0:0:0 with SMTP id h4csp1951710wrt; Wed, 21 Sep 2022 07:05:35 -0700 (PDT) X-Google-Smtp-Source: AMsMyM43AnWjPsaotuPzXsK8PU24IvR6kCdryvML+2qQ1ajuvIxfWFGFr+lJdFSMub2G1en6DVY9 X-Received: by 2002:a17:907:7da6:b0:774:53b9:5ae5 with SMTP id oz38-20020a1709077da600b0077453b95ae5mr21424697ejc.759.1663769135336; Wed, 21 Sep 2022 07:05:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663769135; cv=none; d=google.com; s=arc-20160816; b=qvq7WAyv0TYAZZtUm+q9cFyiSR+D69Tjtlx3MA8o9UNKjdbrmeRgUUntY4w30iMgbY lfdUigrPQ1eSxxDW3YgoPxfxxo7Nu/DwF9T10mJ05Wx8CTNeV5NEWbbgObIOPyDOAo8V 4ybEZJ8V89/SODI7nW3TVgT1Jv9NAquekRcNxYGBCdcrNnrPC1o2PketBG0Gkrpfvjp7 gVH/fvLFvVA/D1WXAUtZX/M0tMPQqR07wbPkpBPo2dsYG5Z2Imiii2/Za8DnkTg3CtVQ XHcF3xgQQ9WfjbWRxjE6SPus1/yywvpAX9zHgj5PwFrS/MWuPO5hu7IzOi58Lop1nJ4n LMMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:to :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=9TyzV7A7ZCy+AR/QDHDtYLooQREyVbJVNoan6cSmU6Y=; b=ov0i2CZwavXHrjvVsodBkiyhdyJ96arioJYc6Dk1j/LeRbUw+Jf8k+dlJf6tX5D4r7 uaNYMci3Yam8Wju4tF8v0NSgjgBsYyL6sPlBN9pvRBEJ53zf39oc7rAw5C68PLoGQsHl ApdyFDL/M8thz7wNfkOD/V9Ob1QLie6EgCmQ8l5Et6bus3omzivyM4lTD/y6yKeoTlAc KX0o9DRIAu5LOY9LHXLoTkCVg8LtEeF+55cnhjk7qToaqIaTwJ4hTZ/m/i63tHd9yLaf NvGTgE30ytX1xWYsVl9k7hvbBruhfJ/oimVa/gyUeZjb3evG2ZxD0qZ21AHN1rduoZKG bXaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=Ok6XKqHA; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id cw17-20020a170906479100b007803f5af214si2636274ejc.436.2022.09.21.07.05.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Sep 2022 07:05:35 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=Ok6XKqHA; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7BD68385783E for ; Wed, 21 Sep 2022 14:04:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7BD68385783E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1663769052; bh=9TyzV7A7ZCy+AR/QDHDtYLooQREyVbJVNoan6cSmU6Y=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=Ok6XKqHAl060+oPpir7E9/rNqSM5D8fdyDPlqrPrmoa8zmSgduDJjSKBrWOXSZun2 NtleZVH3snO7z6nmhl1HNhboT6jAYMbMd+dPBxo9Brv4OCWBmoUH19PBWyOpdjPlM3 NEvuLyDczHhbFsJ6SIvBvSy83GuOZHj/PlbaNzWI= 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 D06BE3857B8A for ; Wed, 21 Sep 2022 14:03:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D06BE3857B8A Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-362-qw6NuvB_MnqGrJzFyJ6XtQ-1; Wed, 21 Sep 2022 10:03:12 -0400 X-MC-Unique: qw6NuvB_MnqGrJzFyJ6XtQ-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7292F3C10147; Wed, 21 Sep 2022 14:03:12 +0000 (UTC) Received: from localhost (unknown [10.33.36.214]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3A5AB492B0A; Wed, 21 Sep 2022 14:03:12 +0000 (UTC) To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Update synopsis test for C++11 and later Date: Wed, 21 Sep 2022 15:03:11 +0100 Message-Id: <20220921140311.922750-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.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_LOW, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jonathan Wakely via Gcc-patches From: Jonathan Wakely Reply-To: Jonathan Wakely Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1744588384788749089?= X-GMAIL-MSGID: =?utf-8?q?1744588384788749089?= Tested powerpc64le-linux, pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * testsuite/20_util/headers/memory/synopsis.cc: Add declarations from C++11 and later. --- .../20_util/headers/memory/synopsis.cc | 66 +++++++++++++++++-- 1 file changed, 59 insertions(+), 7 deletions(-) diff --git a/libstdc++-v3/testsuite/20_util/headers/memory/synopsis.cc b/libstdc++-v3/testsuite/20_util/headers/memory/synopsis.cc index 03e3f80dac5..15437c72ee0 100644 --- a/libstdc++-v3/testsuite/20_util/headers/memory/synopsis.cc +++ b/libstdc++-v3/testsuite/20_util/headers/memory/synopsis.cc @@ -26,20 +26,35 @@ # define NOTHROW #endif -namespace std { +namespace std +{ +#if __cplusplus >= 201103L + template struct pointer_traits; + template struct pointer_traits; + + void* align(size_t alignment, size_t size, void*& ptr, size_t& space); + + struct allocator_arg_t; + extern const allocator_arg_t allocator_arg; + + template struct uses_allocator; + + template struct allocator_traits; +#endif // C++11 + +#if __STDC_HOSTED__ // lib.default.allocator, the default allocator: template class allocator; +#if __cplusplus >= 202002L + template + constexpr bool operator==(const allocator&, const allocator&) throw(); +#else template <> class allocator; template -#if __cplusplus > 201703L - constexpr -#endif bool operator==(const allocator&, const allocator&) throw(); template -#if __cplusplus > 201703L - constexpr -#endif bool operator!=(const allocator&, const allocator&) throw(); +#endif // lib.storage.iterator, raw storage iterator: template class raw_storage_iterator; @@ -49,18 +64,55 @@ namespace std { pair get_temporary_buffer(ptrdiff_t n) NOTHROW; template void return_temporary_buffer(T* p); +#endif // HOSTED // lib.specialized.algorithms, specialized algorithms: +#if __cplusplus >= 201703L + template constexpr T* addressof(T&) noexcept; +#elif __cplusplus >= 201402L + template T* addressof(T&) noexcept; +#endif template ForwardIterator uninitialized_copy(InputIterator first, InputIterator last, ForwardIterator result); +#if __cplusplus >= 201103L + template + ForwardIterator + uninitialized_copy_n(InputIterator first, Size n, ForwardIterator result); +#endif template void uninitialized_fill(ForwardIterator first, ForwardIterator last, const T& x); template void uninitialized_fill_n(ForwardIterator first, Size n, const T& x); +#if __cplusplus >= 201103L + template class default_delete; + template class default_delete; + template class unique_ptr; + template class unique_ptr; + template + void swap(unique_ptr&, unique_ptr&) noexcept; +#if __cplusplus >= 201402L + template unique_ptr make_unique(Args&&...); +#endif + + class bad_weak_ptr; + template class shared_ptr; + template shared_ptr make_shared(Args&&... args); + template + shared_ptr allocate_shared(const A& a, Args&&... args); + template void swap(shared_ptr&, shared_ptr&) noexcept; + template class weak_ptr; + template void swap(weak_ptr&, weak_ptr&) noexcept; + template class owner_less; + template class enable_shared_from_this; + + template struct hash>; + template struct hash>; +#endif + // lib.auto.ptr, pointers: template class auto_ptr; }