public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Jonathan Wakely <redi@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r12-2703] libstdc++: Replace TR1 components with C++11 ones in test utils Date: Tue, 3 Aug 2021 15:34:12 +0000 (GMT) [thread overview] Message-ID: <20210803153412.5E3B03959E6B@sourceware.org> (raw) https://gcc.gnu.org/g:5c6759e41607f9edbbe25be18bd322d6a0408238 commit r12-2703-g5c6759e41607f9edbbe25be18bd322d6a0408238 Author: Jonathan Wakely <jwakely@redhat.com> Date: Tue Aug 3 15:02:50 2021 +0100 libstdc++: Replace TR1 components with C++11 ones in test utils Signed-off-by: Jonathan Wakely <jwakely@redhat.com> libstdc++-v3/ChangeLog: * testsuite/util/testsuite_common_types.h: Replace uses of tr1::unordered_map and tr1::unordered_set with their C++11 equivalents. * testsuite/29_atomics/atomic/cons/assign_neg.cc: Adjust dg-error line number. * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise. * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc: Likewise. * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise. * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc: Likewise. * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc: Likewise. * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc: Likewise. Diff: --- .../testsuite/29_atomics/atomic/cons/assign_neg.cc | 2 +- .../testsuite/29_atomics/atomic/cons/copy_neg.cc | 2 +- .../29_atomics/atomic_integral/cons/assign_neg.cc | 2 +- .../29_atomics/atomic_integral/cons/copy_neg.cc | 2 +- .../atomic_integral/operators/bitwise_neg.cc | 6 +++--- .../atomic_integral/operators/decrement_neg.cc | 6 +++--- .../atomic_integral/operators/increment_neg.cc | 6 +++--- libstdc++-v3/testsuite/util/testsuite_common_types.h | 18 +++++++++++------- 8 files changed, 24 insertions(+), 20 deletions(-) diff --git a/libstdc++-v3/testsuite/29_atomics/atomic/cons/assign_neg.cc b/libstdc++-v3/testsuite/29_atomics/atomic/cons/assign_neg.cc index 4907312b547..f0520af8e0d 100644 --- a/libstdc++-v3/testsuite/29_atomics/atomic/cons/assign_neg.cc +++ b/libstdc++-v3/testsuite/29_atomics/atomic/cons/assign_neg.cc @@ -27,5 +27,5 @@ int main() return 0; } -// { dg-error "deleted" "" { target *-*-* } 659 } +// { dg-error "deleted" "" { target *-*-* } 663 } // { dg-prune-output "include" } diff --git a/libstdc++-v3/testsuite/29_atomics/atomic/cons/copy_neg.cc b/libstdc++-v3/testsuite/29_atomics/atomic/cons/copy_neg.cc index 0b67f61dd14..76bb2d60350 100644 --- a/libstdc++-v3/testsuite/29_atomics/atomic/cons/copy_neg.cc +++ b/libstdc++-v3/testsuite/29_atomics/atomic/cons/copy_neg.cc @@ -27,5 +27,5 @@ int main() return 0; } -// { dg-error "deleted" "" { target *-*-* } 698 } +// { dg-error "deleted" "" { target *-*-* } 702 } // { dg-prune-output "include" } diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/assign_neg.cc b/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/assign_neg.cc index c54a51e4cab..8def1559bd4 100644 --- a/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/assign_neg.cc +++ b/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/assign_neg.cc @@ -28,5 +28,5 @@ int main() return 0; } -// { dg-error "deleted" "" { target *-*-* } 659 } +// { dg-error "deleted" "" { target *-*-* } 663 } // { dg-prune-output "include" } diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/copy_neg.cc b/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/copy_neg.cc index c7d01ee31d8..9ef033bd678 100644 --- a/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/copy_neg.cc +++ b/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/copy_neg.cc @@ -28,5 +28,5 @@ int main() return 0; } -// { dg-error "deleted" "" { target *-*-* } 698 } +// { dg-error "deleted" "" { target *-*-* } 702 } // { dg-prune-output "include" } diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc b/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc index f6749fdd97b..69c307bebae 100644 --- a/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc +++ b/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc @@ -26,8 +26,8 @@ int main() return 0; } -// { dg-error "operator" "" { target *-*-* } 495 } -// { dg-error "operator" "" { target *-*-* } 496 } -// { dg-error "operator" "" { target *-*-* } 497 } +// { dg-error "operator" "" { target *-*-* } 499 } +// { dg-error "operator" "" { target *-*-* } 500 } +// { dg-error "operator" "" { target *-*-* } 501 } // { dg-prune-output "declared here" } diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc b/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc index 765e3af270e..31ce7d0d149 100644 --- a/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc +++ b/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc @@ -27,6 +27,6 @@ int main() return 0; } -// { dg-error "operator" "" { target *-*-* } 447 } -// { dg-error "operator" "" { target *-*-* } 448 } -// { dg-error "operator" "" { target *-*-* } 449 } +// { dg-error "operator" "" { target *-*-* } 451 } +// { dg-error "operator" "" { target *-*-* } 452 } +// { dg-error "operator" "" { target *-*-* } 453 } diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/increment_neg.cc b/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/increment_neg.cc index 55c331deb59..7df8ff7ecfb 100644 --- a/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/increment_neg.cc +++ b/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/increment_neg.cc @@ -27,6 +27,6 @@ int main() return 0; } -// { dg-error "operator" "" { target *-*-* } 425 } -// { dg-error "operator" "" { target *-*-* } 426 } -// { dg-error "operator" "" { target *-*-* } 427 } +// { dg-error "operator" "" { target *-*-* } 429 } +// { dg-error "operator" "" { target *-*-* } 430 } +// { dg-error "operator" "" { target *-*-* } 431 } diff --git a/libstdc++-v3/testsuite/util/testsuite_common_types.h b/libstdc++-v3/testsuite/util/testsuite_common_types.h index a9a44df9664..9a3152b3a84 100644 --- a/libstdc++-v3/testsuite/util/testsuite_common_types.h +++ b/libstdc++-v3/testsuite/util/testsuite_common_types.h @@ -40,13 +40,17 @@ #include <map> #include <set> -#include <tr1/functional> -#include <tr1/unordered_map> -#include <tr1/unordered_set> #if __cplusplus >= 201103L #include <atomic> #include <type_traits> +#include <unordered_map> +#include <unordered_set> +namespace unord = std; +#else +#include <tr1/unordered_map> +#include <tr1/unordered_set> +namespace unord = std::tr1; #endif namespace __gnu_test @@ -185,14 +189,14 @@ namespace __gnu_test typedef Tp value_type; typedef Tp key_type; typedef std::pair<const key_type, value_type> pair_type; - typedef std::tr1::hash<key_type> hash_function; + typedef unord::hash<key_type> hash_function; typedef std::equal_to<key_type> equality_function; template<typename Tl> struct container { typedef Tl allocator_type; - typedef std::tr1::unordered_map<key_type, value_type, hash_function, equality_function, allocator_type> type; + typedef unord::unordered_map<key_type, value_type, hash_function, equality_function, allocator_type> type; }; typedef allocator_policies<pair_type, Thread> allocator_types; @@ -224,14 +228,14 @@ namespace __gnu_test { typedef Tp value_type; typedef Tp key_type; - typedef std::tr1::hash<key_type> hash_function; + typedef unord::hash<key_type> hash_function; typedef std::equal_to<key_type> equality_function; template<typename Tl> struct container { typedef Tl allocator_type; - typedef std::tr1::unordered_set<key_type, hash_function, equality_function, allocator_type> type; + typedef unord::unordered_set<key_type, hash_function, equality_function, allocator_type> type; }; typedef allocator_policies<key_type, Thread> allocator_types;
reply other threads:[~2021-08-03 15:34 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210803153412.5E3B03959E6B@sourceware.org \ --to=redi@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ --cc=libstdc++-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).