From patchwork Fri Jul 3 16:46:32 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: 39885 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 A8FEB386F44A; Fri, 3 Jul 2020 16:47:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A8FEB386F44A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1593794861; bh=8qw5GfPGmVc393aUCLS/D80TJFnjcA1tEHmU5k8NzHg=; h=Date:In-Reply-To:References:Subject:To:List-Id:List-Unsubscribe: List-Archive:List-Help:List-Subscribe:From:Reply-To:Cc:From; b=RlebFRrlK93OtmuKn9CoqTpefm8LqmvDXjQcq6Xy2Le3sfGdW2lAZvIh2O7zLXxh4 LRu+oNUoI26FDheJfFEJfA0yJ+PJhWgrnb7ECAA5eoFYiddvQxcPrUr9XSnQCetT9j iD4vHrPQw7aqAZLlnkvN7uOEjK8NtLvSPCKJ4l60= 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 D8940384402F for ; Fri, 3 Jul 2020 16:47:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D8940384402F Received: by mail-qt1-x849.google.com with SMTP id e6so21182754qtb.19 for ; Fri, 03 Jul 2020 09:47:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=8qw5GfPGmVc393aUCLS/D80TJFnjcA1tEHmU5k8NzHg=; b=H+CCkKFPbdl5loTSOztkqrA+l6JpH4L6vgWpgqmDys209jrW5QwwUub/eXLLQZpUnX IMZ6S7lLs76pkJU1sP7szQeTjogFfsGetDpDS8te84W669i3hf388SpX84n1Fn8F+xNZ RZfQBeY1KH7PyGlJ7X7//594WPFoH7YzOX7F0hXgFVe10NdUHNtd8jSLRryvRpr4A0+m QlJYi69y64gEXujtzpn+A6DHj+mMMJ08wJ/pwfEa7C52vKXfSD3lI6sU+VTdTKW2bUKo SHcaeLgz4oN4uVnqJZ/p4j5NbEaFybhMRpUBpsJFfdrkh+guaILPRbi0eTc6nQ9jE2bg pNUw== X-Gm-Message-State: AOAM532PlTB6npEMSU1CNtjG6gjkfkGt5zVcM6E2JzUtM1dg/oEQU6oS 6+pjtVGGS7JnKN6aLY7/4wk2oGo8OIrERc4R9Urd5CiZX2HpMd9qeQ6ECmld/LlhHbYfmAGybnm pWHWsjjChV6JWFs9EGtK39U97cLS91yDpASleEGQM4m+7h7DFDGMQcAk16rPUIiyg1mJl6/A= X-Google-Smtp-Source: ABdhPJy6KOnYupK12E6naE1kmsA7Yc/1p7LKh7VBiPJcJxBeRFY53iAduWAJIYFLNt/eot53onJvnhJfLq6R0A== X-Received: by 2002:a0c:a4e3:: with SMTP id x90mr6889267qvx.36.1593794859271; Fri, 03 Jul 2020 09:47:39 -0700 (PDT) Date: Fri, 3 Jul 2020 18:46:32 +0200 In-Reply-To: <20200703164651.1510825-1-maennich@google.com> Message-Id: <20200703164651.1510825-3-maennich@google.com> Mime-Version: 1.0 References: <20200619214305.562-1-maennich@google.com> <20200703164651.1510825-1-maennich@google.com> X-Mailer: git-send-email 2.27.0.212.ge8ba1cc988-goog Subject: [PATCH v2 02/21] abg-cxx-compat: more support: std::bind and friends To: libabigail@sourceware.org X-Spam-Status: No, score=-22.0 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" Add abg_compat::{bind,function,placeholders} to the compatibility layer. That is made use of in a later patch. As usual, for C++ standards that natively support this functionality (C++11 and later), the native implementation is aliased into the abg_compat namespace. * include/abg-cxx-compat.h: add support for abg_compat::{bind,function,placeholders} Reviewed-by: Giuliano Procida Signed-off-by: Matthias Maennich --- include/abg-cxx-compat.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/include/abg-cxx-compat.h b/include/abg-cxx-compat.h index 1283e9191d46..cab2883b231e 100644 --- a/include/abg-cxx-compat.h +++ b/include/abg-cxx-compat.h @@ -58,8 +58,15 @@ namespace abg_compat { #if __cplusplus >= 201103L // +using std::bind; +using std::function; using std::hash; +namespace placeholders +{ +using namespace std::placeholders; +} + // using std::shared_ptr; using std::weak_ptr; @@ -75,8 +82,15 @@ using std::unordered_set; #else // +using std::tr1::bind; +using std::tr1::function; using std::tr1::hash; +namespace placeholders +{ +using namespace std::tr1::placeholders; +} + // using std::tr1::shared_ptr; using std::tr1::weak_ptr;