From reviews-return-79925-apmail-mesos-reviews-archive=mesos.apache.org@mesos.apache.org Mon Jul 16 19:22:08 2018 Return-Path: X-Original-To: apmail-mesos-reviews-archive@minotaur.apache.org Delivered-To: apmail-mesos-reviews-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 05166183DD for ; Mon, 16 Jul 2018 19:22:08 +0000 (UTC) Received: (qmail 29249 invoked by uid 500); 16 Jul 2018 19:22:07 -0000 Delivered-To: apmail-mesos-reviews-archive@mesos.apache.org Received: (qmail 29217 invoked by uid 500); 16 Jul 2018 19:22:07 -0000 Mailing-List: contact reviews-help@mesos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: reviews@mesos.apache.org Delivered-To: mailing list reviews@mesos.apache.org Received: (qmail 29205 invoked by uid 99); 16 Jul 2018 19:22:07 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Jul 2018 19:22:07 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id D2C16C035E; Mon, 16 Jul 2018 19:22:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.95 X-Spam-Level: X-Spam-Status: No, score=0.95 tagged_above=-999 required=6.31 tests=[HEADER_FROM_DIFFERENT_DOMAINS=0.25, HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id KE-DWOfnvxw3; Mon, 16 Jul 2018 19:22:05 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id A59CA5F1EA; Mon, 16 Jul 2018 19:22:04 +0000 (UTC) Received: from reviews.apache.org (unknown [10.41.0.12]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 46323E00D3; Mon, 16 Jul 2018 19:22:04 +0000 (UTC) Received: from reviews-vm2.apache.org (localhost [IPv6:::1]) by reviews.apache.org (ASF Mail Server at reviews-vm2.apache.org) with ESMTP id 301F0C4013C; Mon, 16 Jul 2018 19:22:04 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============0930251828708753395==" MIME-Version: 1.0 Subject: Re: Review Request 67927: Removed potentially unneeded lambda capture. From: Benjamin Bannier To: Dario Rexin , Benjamin Hindman Cc: Benjamin Bannier , Mesos Reviewbot Windows , mesos Date: Mon, 16 Jul 2018 19:22:04 -0000 Message-ID: <20180716192204.13477.85559@reviews-vm2.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Benjamin Bannier X-ReviewGroup: mesos X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/67927/ X-Sender: Benjamin Bannier References: <20180716123737.13477.69845@reviews-vm2.apache.org> In-Reply-To: <20180716123737.13477.69845@reviews-vm2.apache.org> Reply-To: Benjamin Bannier X-ReviewRequest-Repository: mesos --===============0930251828708753395== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/67927/ ----------------------------------------------------------- (Updated July 16, 2018, 9:22 p.m.) Review request for mesos, Benjamin Hindman and Dario Rexin. Changes ------- Added extended comment. Summary (updated) ----------------- Removed potentially unneeded lambda capture. Repository: mesos Description ------- In some instances variables used in the body of a lambda do not need to be captured explicitly, see e.g., https://stackoverflow.com/a/43468519/176922. Support for this across compiler vendors seems to be incomplete at this point; while e.g., clang emits a warning (which we potentially turn into a fatal error) for this, msvc still seems to require such variables to be captured. To provide a warning free build this patch moves from the usually preferred explicit capture list to an implicit capture by reference. This allows us to capture all needed variables correctly without having to capture too much. Diffs (updated) ----- 3rdparty/libprocess/src/tests/benchmarks.cpp e8ef21fd9c203ac5e10c17694393322151231435 Diff: https://reviews.apache.org/r/67927/diff/3/ Changes: https://reviews.apache.org/r/67927/diff/2-3/ Testing ------- Tested on a number of platforms and compilers in internal CI. Thanks, Benjamin Bannier --===============0930251828708753395==--