From patchwork Fri Oct 4 15:06:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 1171893 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-510268-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="i7QEUAj5"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46lCrn4kCfz9sNw for ; Sat, 5 Oct 2019 01:06:49 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=AWHG0MWQabmorXymT4HNZu47f6LP8nHTKjwzZfo87nRQEfoLUPSdT f9Y0Gq0RnZ1aTx1bfbUAwpnGH4DkvVjFUykcnpA37Xa5wJPJK2u07NohdgK3sN9w DJSUIshVvFq1sopsQnIfQJ9NlWfkVNMw2/PIqkLHXyyLygSylZVHNw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=ghJU2TLXMCd19ptstisRMrq0cs8=; b=i7QEUAj5q3IyLAfnOqt0 VM9yg3SKCYLAvqvMZtCPEAGMHWu/4LS3SWyi2MHSmVt9irj5rK+K3NYR5zIsUS6c pegk5fORGyiQpZM8MHJCs+SC3/hgoFCShYwwSW283BxE3AifuOnnQkEh2FBJVsSL qJM+v5GpA2f1vNG54AVmzJU= Received: (qmail 23374 invoked by alias); 4 Oct 2019 15:06:35 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 23355 invoked by uid 89); 4 Oct 2019 15:06:35 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-16.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:2397, interactions X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 04 Oct 2019 15:06:34 +0000 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5C99518C4297; Fri, 4 Oct 2019 15:06:33 +0000 (UTC) Received: from localhost (unknown [10.33.36.125]) by smtp.corp.redhat.com (Postfix) with ESMTP id DC3F1600C4; Fri, 4 Oct 2019 15:06:32 +0000 (UTC) Date: Fri, 4 Oct 2019 16:06:31 +0100 From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [PATCH] Replace uses of std::tr1::unordered_map in testsuite Message-ID: <20191004150631.GA3363@redhat.com> MIME-Version: 1.0 Content-Disposition: inline X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.12.1 (2019-06-15) I see no reason to use tr1::unordered_map unless we have to (because we're compiling a test in C++98 mode). * testsuite/util/testsuite_abi.h: Use std::unordered_map instead of std::tr1::unordered_map. * testsuite/util/testsuite_allocator.h: Likewise. Tested x86_64-linux, committed to trunk. commit 60fa713a0ceae1af80a26a7e459c1215e6eb0adc Author: Jonathan Wakely Date: Fri Oct 4 14:21:31 2019 +0100 Replace uses of std::tr1::unordered_map in testsuite * testsuite/util/testsuite_abi.h: Use std::unordered_map instead of std::tr1::unordered_map. * testsuite/util/testsuite_allocator.h: Likewise. diff --git a/libstdc++-v3/testsuite/util/testsuite_abi.h b/libstdc++-v3/testsuite/util/testsuite_abi.h index 47fbd76bb96..8f6a89e8739 100644 --- a/libstdc++-v3/testsuite/util/testsuite_abi.h +++ b/libstdc++-v3/testsuite/util/testsuite_abi.h @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include // Encapsulates symbol characteristics. @@ -65,7 +65,7 @@ struct symbol }; // Map type between symbol names and full symbol info. -typedef std::tr1::unordered_map symbols; +typedef std::unordered_map symbols; // Check. diff --git a/libstdc++-v3/testsuite/util/testsuite_allocator.h b/libstdc++-v3/testsuite/util/testsuite_allocator.h index 34dba16669f..67e70a29edb 100644 --- a/libstdc++-v3/testsuite/util/testsuite_allocator.h +++ b/libstdc++-v3/testsuite/util/testsuite_allocator.h @@ -26,7 +26,6 @@ #ifndef _GLIBCXX_TESTSUITE_ALLOCATOR_H #define _GLIBCXX_TESTSUITE_ALLOCATOR_H -#include #include #include #include @@ -36,6 +35,14 @@ # include #endif +#if __cplusplus >= 201103L +# include +namespace unord = std; +#else +# include +namespace unord = std::tr1; +#endif + namespace __gnu_test { class tracker_allocator_counter @@ -269,7 +276,7 @@ namespace __gnu_test // (see N1599). struct uneq_allocator_base { - typedef std::tr1::unordered_map map_type; + typedef unord::unordered_map map_type; // Avoid static initialization troubles and/or bad interactions // with tests linking testsuite_allocator.o and playing globally