From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 79462 invoked by alias); 6 Mar 2018 22:13:40 -0000 Mailing-List: contact cygwin-apps-help@cygwin.com; run by ezmlm Precedence: bulk Sender: cygwin-apps-owner@cygwin.com List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Mail-Followup-To: cygwin-apps@cygwin.com Received: (qmail 79335 invoked by uid 89); 6 Mar 2018 22:13:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-spam-relays-external:ESMTPA, HContent-Transfer-Encoding:8bit X-HELO: out1-smtp.messagingengine.com Received: from out1-smtp.messagingengine.com (HELO out1-smtp.messagingengine.com) (66.111.4.25) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 06 Mar 2018 22:13:38 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id E535120A91 for ; Tue, 6 Mar 2018 17:13:36 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute6.internal (MEProxy); Tue, 06 Mar 2018 17:13:36 -0500 X-ME-Sender: Received: from [192.168.1.102] (host86-151-121-236.range86-151.btcentralplus.com [86.151.121.236]) by mail.messagingengine.com (Postfix) with ESMTPA id 917E22482D for ; Tue, 6 Mar 2018 17:13:36 -0500 (EST) Subject: Re: setup: problems with local install To: "cygwin-apps@cygwin.com" References: <3cd80653-6a63-ae3d-d79c-a1642ad63fce@cornell.edu> <76209447-c5a7-2fa4-941e-4040a2de484f@dronecode.org.uk> From: Jon Turney Message-ID: <127b9506-8319-974c-e583-da8e2425fdaa@dronecode.org.uk> Date: Tue, 06 Mar 2018 22:13:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-SW-Source: 2018-03/txt/msg00013.txt.bz2 On 06/03/2018 19:31, Ken Brown wrote: > On 3/6/2018 10:18 AM, Jon Turney wrote: >> (I also note we have also have another 'erase an element from a vector >> while we are iterating over it' here, so that needs fixing, as well) > > I think this one might be OK.  If I'm not mistaken, > pkg.versions.erase(i++) passes a copy of i to erase, and then increments > i before erase() has done its work.  But I'm no expert on this. I think that's still not ok for a vector, but this is actually a set, so there's actually no problem. See e.g. [1], or refer to your copy of the C++ standard :) [1] https://stackoverflow.com/questions/6438086/iterator-invalidation-rules