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: 57853 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 917C8385355D for ; Wed, 21 Sep 2022 14:03:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 917C8385355D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1663769037; 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=jXwYdU2WbzPN6Lu5SO6Yi1/ueQZotwiNkBQpHbmhOdIwCECd9qbA3tts2ncTxyAZ9 Y4kkRQjo2u3QwSnIxfl7c1tJm5KVbnzdR1YtL0nC6JkbXeGLiE6PNusTSPHBraWcaI DDdh/PVzi8NUAro851LWHdxt8XEOEU98DTh2RYvw= 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+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" 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; }