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 DDD8F385803E for ; Wed, 21 Sep 2022 14:03:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DDD8F385803E 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=1663768996; 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=9TyzV7A7ZCy+AR/QDHDtYLooQREyVbJVNoan6cSmU6Y=; b=TBJNxOWKig7XIoLMJ4Jwiu+P6PoVlQbLF3prMGNa529THhZW0exbV0jlmBzRO6n1XFZeZs iBJXKY5slWcEL7ZSB8KHfTp+LPsmHb5QJCMRADiz4lN/DOkgBOTmpNukrmPQNGPUz18Ya/ AvuAZ4OFulj7LYhaAfouPuiOt/pQCs4= 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) From: Jonathan Wakely 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 Content-Type: text/plain Content-Transfer-Encoding: 8bit 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 List-Id: 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; } -- 2.37.3