From patchwork Mon Dec 14 23:08:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Matthias_M=C3=A4nnich?= X-Patchwork-Id: 41382 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0985B3857C4D; Mon, 14 Dec 2020 23:09:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0985B3857C4D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1607987354; bh=vHimR4b/KNbsEcNGpyikVT9046DcrhmDgwkQfqQc6nU=; h=Date:In-Reply-To:References:Subject:To:List-Id:List-Unsubscribe: List-Archive:List-Help:List-Subscribe:From:Reply-To:Cc:From; b=Xy0du2LyCoJ9KLyrwgVklHXOZaIQSnZUXzrFvZc10mhrpD0SUPVKMZ+Axf1PK5Xs6 8qaMa6Qzz6IWQxvN/k9qjxj47cjMp5aoVEeyX8yCqXEyYcseVc4BXvayWPDBftGmuP s/7hkFgUvN8mIklZ0aSZ7zsp+Z2MCa86/wy+grzU= X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org Received: from mail-qt1-x849.google.com (mail-qt1-x849.google.com [IPv6:2607:f8b0:4864:20::849]) by sourceware.org (Postfix) with ESMTPS id 364F93858D29 for ; Mon, 14 Dec 2020 23:09:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 364F93858D29 Received: by mail-qt1-x849.google.com with SMTP id h7so12846197qtn.21 for ; Mon, 14 Dec 2020 15:09:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=vHimR4b/KNbsEcNGpyikVT9046DcrhmDgwkQfqQc6nU=; b=gWHzXw4aXyS7Xn8z5ghFYE08TCEgLEmj9F09SZbxi+ey4WQLa0Q401UHasuovpORLM hsH1clmxb1gsd35nf6e5RWvbJmDb35myxyXL9Pyhzn3kLgGsLIRGYhZ0r6Jr+mQlxNhR xn4wKdbaWWgYT7FAt+zm1JKYXA6OVjSS6+vMkUdMvw3i5YxZeCd1oLoNed0g6cvL/KqS ogfXarPoEWzkVyWshaKWjrXMVHlxXBkaGtd0QOTpgsbrtHPK1sIzpGDlIiZARV8qKSuy DWnVnlsLrBWChZisRGHuPRpqkySepEIHhEeVkP4d13kMdfaRkDK0kcKysGk8Lbk/2lj+ 7AEg== X-Gm-Message-State: AOAM533M/ex1f7u2l6dXmUVmnZOkza03sYvOyygmyUlUubNKoFHkDcWP WhzylO1VSjsOYX3li1/rVUjfwqPehFCs44tH3FdGzphENxdM+QLFM56g/r54qiwRbxsKoqk+g43 T0GKM51RoAGezbhIDLYv/z2RwkJbGIuy1AutoVzHTCkL6FNc6HO3FtfDIZfoenTosofBFRA8= X-Google-Smtp-Source: ABdhPJzTpeSqHdrlV2zcfbn5kXBKesiwiBSuTDs7BZrWi0TY+LlQbqgATdhztmI57I6ke2QghKnnvcn4SIKU/g== X-Received: from lux.lon.corp.google.com ([2a00:79e0:d:210:7220:84ff:fe09:a3aa]) (user=maennich job=sendgmr) by 2002:a0c:9adc:: with SMTP id k28mr28062568qvf.42.1607987350759; Mon, 14 Dec 2020 15:09:10 -0800 (PST) Date: Mon, 14 Dec 2020 23:08:51 +0000 In-Reply-To: <20201214230855.1574934-1-maennich@google.com> Message-Id: <20201214230855.1574934-2-maennich@google.com> Mime-Version: 1.0 References: <20201214230855.1574934-1-maennich@google.com> X-Mailer: git-send-email 2.29.2.684.gfbc64c5ab5-goog Subject: [PATCH 1/6] Drop C++03 compatibility layer To: libabigail@sourceware.org X-Spam-Status: No, score=-22.2 required=5.0 tests=BAYES_00, DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-Patchwork-Original-From: Matthias Maennich via Libabigail From: =?utf-8?q?Matthias_M=C3=A4nnich?= Reply-To: Matthias Maennich Cc: maennich@google.com, kernel-team@android.com Errors-To: libabigail-bounces@sourceware.org Sender: "Libabigail" Now with C++11 as minimum standard, we can drop the facilities required to support earlier standards. Hence purge the use of std::tr1 from the sources. * include/abg-cxx-compat.h: remove compatibility with pre C++11. * include/abg-ir.h: Remove mention of std::tr1 from comments. * include/abg-sptr-utils.h: Likewise. Signed-off-by: Matthias Maennich --- include/abg-cxx-compat.h | 32 -------------------------------- include/abg-ir.h | 4 ++-- include/abg-sptr-utils.h | 4 ++-- 3 files changed, 4 insertions(+), 36 deletions(-) diff --git a/include/abg-cxx-compat.h b/include/abg-cxx-compat.h index 46b2ac3aa564..1d5dab48be75 100644 --- a/include/abg-cxx-compat.h +++ b/include/abg-cxx-compat.h @@ -8,26 +8,13 @@ #ifndef __ABG_CXX_COMPAT_H #define __ABG_CXX_COMPAT_H -#if __cplusplus >= 201103L - #include #include #include #include -#else - -#include -#include -#include -#include - -#endif - namespace abg_compat { -#if __cplusplus >= 201103L - // using std::hash; @@ -43,25 +30,6 @@ using std::unordered_map; // using std::unordered_set; -#else - -// -using std::tr1::hash; - -// -using std::tr1::shared_ptr; -using std::tr1::weak_ptr; -using std::tr1::dynamic_pointer_cast; -using std::tr1::static_pointer_cast; - -// -using std::tr1::unordered_map; - -// -using std::tr1::unordered_set; - -#endif - } #endif // __ABG_CXX_COMPAT_H diff --git a/include/abg-ir.h b/include/abg-ir.h index 165b336aacee..11af6b00647d 100644 --- a/include/abg-ir.h +++ b/include/abg-ir.h @@ -35,7 +35,7 @@ /// How objects' lifetime is handled in libabigail. /// /// For memory management and garbage collection of libabigail's IR -/// artifacts, we use std::tr1::shared_ptr and std::tr1::weak_ptr. +/// artifacts, we use std::shared_ptr and std::weak_ptr. /// /// When manipulating these IR artifacts, there are a few rules to keep in /// mind. @@ -90,7 +90,7 @@ namespace abigail namespace ir { -// Inject some std::tr1 types in here. +// Inject some std types in here. using abg_compat::unordered_map; /// A convenience typedef fo r an ordered set of size_t. diff --git a/include/abg-sptr-utils.h b/include/abg-sptr-utils.h index 8259c8e11f21..3f328522a153 100644 --- a/include/abg-sptr-utils.h +++ b/include/abg-sptr-utils.h @@ -5,7 +5,7 @@ /// @file /// -/// Utilities to ease the wrapping of C types into std::tr1::shared_ptr +/// Utilities to ease the wrapping of C types into std::shared_ptr #ifndef __ABG_SPTR_UTILS_H__ #define __ABG_SPTR_UTILS_H__ @@ -17,7 +17,7 @@ namespace abigail { -/// Namespace for the utilities to wrap C types into std::tr1::shared_ptr. +/// Namespace for the utilities to wrap C types into std::shared_ptr. namespace sptr_utils {