220 24901 <b2929634-db24-427d-8f54-8b8ff4b047ef@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: martin.tillmann@gmail.com
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Range erase for std::vector and other containers.
Date: Thu, 3 Mar 2016 10:04:37 -0800 (PST)
Lines: 58
Approved: news@gmane.org
Message-ID: <b2929634-db24-427d-8f54-8b8ff4b047ef@isocpp.org>
References: <9a7a06c1-860e-44b1-a865-8467c39d7e91@isocpp.org>
 <CAGNvRgAk_Ry_yNkCR7cVNFty1qta2Pv_OvMXK3VJ=hrbDWPZrA@mail.gmail.com>
 <5846f36a-8119-4ec0-b1bd-fcfe1bce27f7@isocpp.org>
 <CAGNvRgA8fv=Jg+4HtwFM6zSGLdzf4PSadz9Cr8_5Zoemy2FW2w@mail.gmail.com>
 <024aea92-794f-435e-97a3-ad43dbc478bc@isocpp.org>
 <73454c65-98c8-4327-a0f4-858652f5009e@isocpp.org>
 <b30464f1-3cee-4642-a699-4bf4f08e3386@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_414_1944500003.1457028277700"
X-Trace: ger.gmane.org 1457028284 6091 80.91.229.3 (3 Mar 2016 18:04:44 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Thu, 3 Mar 2016 18:04:44 +0000 (UTC)
Cc: martin.tillmann@gmail.com
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBDFIZEER6YPBBNXZ4G3AKGQEULUGKMI@isocpp.org Thu Mar 03 19:04:41 2016
Return-path: <std-proposals+bncBDFIZEER6YPBBNXZ4G3AKGQEULUGKMI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-pf0-f199.google.com ([209.85.192.199])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDFIZEER6YPBBNXZ4G3AKGQEULUGKMI@isocpp.org>)
	id 1abXc8-0007br-QY
	for gclcip-std-proposals@m.gmane.org; Thu, 03 Mar 2016 19:04:41 +0100
Original-Received: by mail-pf0-f199.google.com with SMTP id o67sf45173566pfb.2
        for <gclcip-std-proposals@m.gmane.org>; Thu, 03 Mar 2016 10:04:40 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to:cc:message-id:in-reply-to:references:subject
         :mime-version:x-original-sender:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=fdtDKYjWLofzovFQeehvU4FtwB6KBCGSGDVwgoSElTc=;
        b=c+0N48Ya2cPb71MdFChp0GcfcIW44iF/+rxWWgogF4a+ysL54dsnhjYZH7okYCeC3d
         3PPBaWhQKYt+UkE3BYVbGQlwSuC5PeqqY8f7TD4DKmtxCPwd+/aGW1SgoiPJ4zIkUKQ6
         vii6xt+5LoYy8/QLIz72NJHQXn+PDRKrvYhx9rr6nDXKjeLWyAkTHiTC/u/iBo2i2+FA
         DOrVqNepzyPvtuu67oTxVjXOQE/FqNKTKKSM29enYLyxP8XAAdcz8UJPVSJporMcmUGG
         qsuOigkjJN95bsZxw3QHy1vwQuoYTNwDEkOS9Fb6xxbVnS/pzMR8qMSNyWrwCHPmsP3j
         Fekg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to:cc:message-id:in-reply-to:references:subject
         :mime-version:x-original-sender:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=fdtDKYjWLofzovFQeehvU4FtwB6KBCGSGDVwgoSElTc=;
        b=z1JrRB6h6m4kh3iYFxl6dgpMswut2eEFVhWWNtIFWGbxna19REvs+AZ9MZ3myF0dwz
         YbTJETN2mV/0sxhi+4o8sSMt+GRWvrvXF2cEueE5HeoVqsDl4Qniixpm/0NAuM5Y435r
         6yvrzfqsfdE8dd4NljUuvcuPibmeFqEDDFcH0NRKGwlhClsAPopK2GY9hPUB7Ahum+0h
         SU6RTaXOLRoLXk+LVkMmjKOCt9w5CF36mcHu6hQH5LnM8HnW3UyOSzzaUgDYI9RKF5uO
         5WzCWs8sTpwyFd2n9Z7m+LGJGz/qo1WCmAcUARQ0fOjpwu4SGllprkeJ7Sr9mruV3odz
         9tmg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:date:from:to:cc:message-id:in-reply-to
         :references:subject:mime-version:x-original-sender:reply-to
         :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post
         :list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=fdtDKYjWLofzovFQeehvU4FtwB6KBCGSGDVwgoSElTc=;
        b=glIT+qcG8lKTRuK1qSzWmb2FD4W6H3/yGqNKH4jZNL65APGoZAgZq4YEG640pnwb8G
         gDJWmK9H30pcNSNbg3sE5IGA6djXdDHKIIwYlehXwY59UpI3ClL53lrbqn8lBlupcbmf
         vb45SyTFfWe/tbSPoO6VWhsijjep6rsRz1735lqbZysokbmQhgerNeBXJuR2wu78lrC4
         VJ6TEi1EYZScQ1MTuLhlGAwgADqzlOLJQU3PCywOtRV4SZh5DzdnaEgoNNSGxjKLovlW
         IgdOyNlcVulkaGLGRyo3a53VY2rMh9MwblKu1UYLhTfyE+Uod/brE9WEaFtCBXH/Y8tZ
         fRcA==
X-Gm-Message-State: AD7BkJLNnmNbvI1N1mU5ZgAvrLHJCozDZ1Vp//zch8BSDDiJitKEeA5ofhAGuhQ8N8dPEA==
X-Received: by 10.66.216.100 with SMTP id op4mr2758676pac.9.1457028279748;
        Thu, 03 Mar 2016 10:04:39 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.50.102.73 with SMTP id fm9ls18842igb.44.gmail; Thu, 03 Mar
 2016 10:04:38 -0800 (PST)
X-Received: by 10.50.109.230 with SMTP id hv6mr18697igb.2.1457028278666;
        Thu, 03 Mar 2016 10:04:38 -0800 (PST)
In-Reply-To: <b30464f1-3cee-4642-a699-4bf4f08e3386@isocpp.org>
X-Original-Sender: martin.tillmann@gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Spam-Checked-In-Group: std-proposals@isocpp.org
X-Google-Group-Id: 399137483710
List-Post: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:24901
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/24901>

------=_Part_414_1944500003.1457028277700
Content-Type: multipart/alternative; 
	boundary="----=_Part_415_592921341.1457028277700"

------=_Part_415_592921341.1457028277700
Content-Type: text/plain; charset=UTF-8

Thank you, this is a good explanation.

So in conculsion it is only feasible for mapped containers like std::set 
and would need an new name to not collide with the sementics of the 
existing range erase.
The existing methods like
for(auto& x : vector) set.erase(x);
or std::remove_if with a custom predicate seemed like something the library 
could abstract from, especially since this is such a straight forward 
use-case.

-- 
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/b2929634-db24-427d-8f54-8b8ff4b047ef%40isocpp.org.

------=_Part_415_592921341.1457028277700
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Thank you, this is a good explanation.<br><br>So in concul=
sion it is only feasible for mapped containers like <span style=3D"font-fam=
ily: courier new,monospace;">std::set</span> and would need an new name to =
not collide with the sementics of the existing range <span style=3D"font-fa=
mily: courier new,monospace;">erase</span>.<br>The existing methods like<br=
><span style=3D"font-family: courier new,monospace;">for(auto&amp; x : vect=
or) set.erase(x);</span><br>or <span style=3D"font-family: courier new,mono=
space;">std::remove_if</span> with a custom predicate seemed like something=
 the library could abstract from, especially since this is such a straight =
forward use-case.<br></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/b2929634-db24-427d-8f54-8b8ff4b047ef%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/b2929634-db24-427d-8f54-8b8ff4b047ef=
%40isocpp.org</a>.<br />

------=_Part_415_592921341.1457028277700--
------=_Part_414_1944500003.1457028277700--

.
