From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id D6B0A38582B3; Mon, 18 Mar 2024 14:08:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D6B0A38582B3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1710770883; bh=1pybqwJJ1tqaOW5YJLMNTBpwbq4bQexROua67pSFedo=; h=From:To:Subject:Date:From; b=alLIaQ7NZW3yWFEDdpkYrRCqk53uzhoVU8cDwPpTqp+6lShX2bp1Z73XagyNiAKsH h+03W4kT69KVqAHLItAf0WnveGJicpsAWkoj0mlSBK7g/yY0T4MDCkLnzHNkYw71il w7tTb4l7yP/TGRE0YEfbgZikY8bYKfGxyBxn3f1w= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jonathan Wakely To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r12-10274] libstdc++: Update synopsis test for C++11 and later X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/releases/gcc-12 X-Git-Oldrev: 2d174d4181896129d465cbf42dc454f4f906892b X-Git-Newrev: c0c1207d49d2870542866368da3ae30da7e99baa Message-Id: <20240318140803.D6B0A38582B3@sourceware.org> Date: Mon, 18 Mar 2024 14:08:03 +0000 (GMT) List-Id: https://gcc.gnu.org/g:c0c1207d49d2870542866368da3ae30da7e99baa commit r12-10274-gc0c1207d49d2870542866368da3ae30da7e99baa Author: Jonathan Wakely Date: Wed Sep 21 09:29:39 2022 +0100 libstdc++: Update synopsis test for C++11 and later libstdc++-v3/ChangeLog: * testsuite/20_util/headers/memory/synopsis.cc: Add declarations from C++11 and later. (cherry picked from commit 980aa91e9cefe64245b7c32ee81ba372b7229aeb) Diff: --- .../testsuite/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; }