From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id 19B493857C5B; Wed, 21 Sep 2022 14:02:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 19B493857C5B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1663768972; bh=V+T9tnpEJAIAYmh40nUL1I5hwW7WZ5AicabvKCS3Iho=; h=From:To:Subject:Date:From; b=IlHwIhO1tdFSm2cRqNAyE+AI/sgXMEzcEFBpsLC5a64rNYVRq/ToBNu8K1Nhr/5JG e8VgyZJzie/CqAjDAwgWFAdgGQnGZIPO9Ia2ZyLIR/LvCXH5SDg7iozkrNcXgsADNK mwME7E1Rmo+ajo6WEJHZCdfVQkL0W3aOitBxs1b8= 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 r13-2762] libstdc++: Update synopsis test for C++11 and later X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/master X-Git-Oldrev: dc829c7613ddf562d1aecaf22eda965e87108ac8 X-Git-Newrev: 980aa91e9cefe64245b7c32ee81ba372b7229aeb Message-Id: <20220921140252.19B493857C5B@sourceware.org> Date: Wed, 21 Sep 2022 14:02:52 +0000 (GMT) List-Id: https://gcc.gnu.org/g:980aa91e9cefe64245b7c32ee81ba372b7229aeb commit r13-2762-g980aa91e9cefe64245b7c32ee81ba372b7229aeb 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. 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; }