220 5860 <C114924A-C9F9-4F91-900C-C6CD6BBDA8B9@gmail.com> article
Path: news.gmane.org!not-for-mail
From: Howard Hinnant <howard.hinnant@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Remove vector<bool>?
Date: Mon, 26 Aug 2013 21:06:37 -0400
Lines: 42
Approved: news@gmane.org
Message-ID: <C114924A-C9F9-4F91-900C-C6CD6BBDA8B9@gmail.com>
References: <CAGsORuDQdeWAO5yjA6=h0hW9Y0Sj4F1gcHB61udw5JFmtx+g4Q@mail.gmail.com>	<b06daeb3-a585-4c55-aebf-cae643146838@isocpp.org>	<CAGg_6+O_d85CBjT+cTV6vQqepUTXVvUMV_QUioS6ELpQCav6GQ@mail.gmail.com>	<521B07D2.8070000@beamways.com>	<7d0bc129-f8aa-4803-bbd9-bd5ca504d728@isocpp.org>	<CAGsORuB8omCBfjco6i_zENDn23tx-5wg1jeHuhsGsiVMbGk+Ww@mail.gmail.com>	<77e0868c-6aed-4578-acc7-7cf1227465f6@isocpp.org>	<CAGsORuAAZChA8cyx4JTTqRmMNSGQXZyGdzrm9P0WVRMZSSg6Qw@mail.gmail.com>	<4E5B6BD9-363D-4B42-ACA3-029301F3F54E@gmail.com>	<CA+cyFgvGeOJQSfXAQg3z2TKXvFY-OYvhp6_EGMx_mxoskys7LQ@mail.gmail.com>	<CAGsORuCKcuREjDJVyrfL+eHUF8diSENG2sVC2rjGnfOqcyOdBw@mail.gmail.com>	<5EEBFD4F-87A9-4543-8449-B5CAAC2E29E6@gmail.com> <CAGsORuCY_aPGJ37G6Q_HBVBpm51JUybbRot4WbQPC8etcGfGdA@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\))
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: ger.gmane.org 1377565600 22318 80.91.229.3 (27 Aug 2013 01:06:40 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Tue, 27 Aug 2013 01:06:40 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCK2HM4L6YERBHXX56IAKGQEVTFCEGI@isocpp.org Tue Aug 27 03:06:42 2013
Return-path: <std-proposals+bncBCK2HM4L6YERBHXX56IAKGQEVTFCEGI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-qa0-f72.google.com ([209.85.216.72])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCK2HM4L6YERBHXX56IAKGQEVTFCEGI@isocpp.org>)
	id 1VE7k0-00082t-9l
	for gclcip-std-proposals@m.gmane.org; Tue, 27 Aug 2013 03:06:40 +0200
Original-Received: by mail-qa0-f72.google.com with SMTP id i13sf1517104qae.3
        for <gclcip-std-proposals@m.gmane.org>; Mon, 26 Aug 2013 18:06:39 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=mime-version:subject:from:in-reply-to:date:message-id:references:to
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe:content-type
         :content-transfer-encoding;
        bh=mKcdmZwnE55XDAOcVeYpLsH6os5WAfS+yHqtwn0Rv4k=;
        b=QmtyT1ylw3HcNlBj2uOFiOdV2NU9bu5linM23yy5KfgwNK8JrFYHYzOSUT92j9fJXl
         35suZ9dIqFJnfzpNGD3pFXAK2PFAr+HHPkDKfPhdSDqvqZIYwzZ+VYtWdQ55YUUj7C+/
         ZLvAKdU1xKP3SFEcNvhEcLT/26GzCCPFnUYzRQZREVyXJs7b/jLQ1L/29soEsY0D8AlI
         ZFWGl5RiCK0+cpslmhxKYAvd7U3MmyaMiv989BRlMy7WUpbUNNR9ys25zKiyorWPBEen
         S/7RsDTYUGP2/g2iDGLaOkhJqdoJwMGmscXMYX7+PF+oAnwnHKL04YM7+xrOWGWCf6FM
         hXjw==
X-Received: by 10.236.17.161 with SMTP id j21mr2181434yhj.55.1377565599130;
        Mon, 26 Aug 2013 18:06:39 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.49.1.12 with SMTP id 12ls2639187qei.92.gmail; Mon, 26 Aug 2013
 18:06:38 -0700 (PDT)
X-Received: by 10.49.81.237 with SMTP id d13mr20035734qey.44.1377565598666;
        Mon, 26 Aug 2013 18:06:38 -0700 (PDT)
Original-Received: from mail-qc0-x22d.google.com (mail-qc0-x22d.google.com [2607:f8b0:400d:c01::22d])
        by mx.google.com with ESMTPS id h5si6661062qej.33.1969.12.31.16.00.00
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Mon, 26 Aug 2013 18:06:38 -0700 (PDT)
Received-SPF: pass (google.com: domain of howard.hinnant@gmail.com designates 2607:f8b0:400d:c01::22d as permitted sender) client-ip=2607:f8b0:400d:c01::22d;
Original-Received: by mail-qc0-f173.google.com with SMTP id z10so2204011qcx.32
        for <std-proposals@isocpp.org>; Mon, 26 Aug 2013 18:06:38 -0700 (PDT)
X-Received: by 10.49.17.162 with SMTP id p2mr4077003qed.69.1377565598578;
        Mon, 26 Aug 2013 18:06:38 -0700 (PDT)
Original-Received: from [10.0.1.4] (cpe-24-59-186-27.twcny.res.rr.com. [24.59.186.27])
        by mx.google.com with ESMTPSA id a2sm24467375qek.7.1969.12.31.16.00.00
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Mon, 26 Aug 2013 18:06:36 -0700 (PDT)
In-Reply-To: <CAGsORuCY_aPGJ37G6Q_HBVBpm51JUybbRot4WbQPC8etcGfGdA@mail.gmail.com>
X-Mailer: Apple Mail (2.1508)
X-Original-Sender: howard.hinnant@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of howard.hinnant@gmail.com designates 2607:f8b0:400d:c01::22d as
 permitted sender) smtp.mail=howard.hinnant@gmail.com;       dkim=pass
 header.i=@gmail.com;       dmarc=pass (p=NONE dis=NONE) d=gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <http://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:5860
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/5860>


On Aug 26, 2013, at 8:58 PM, Zhihao Yuan <zy@miator.net> wrote:

> On Mon, Aug 26, 2013 at 8:36 PM, Howard Hinnant
> <howard.hinnant@gmail.com> wrote:
>> Bottom line:  All we have to do is stop assuming that *iter returns a va=
lue_type&.
>=20
> Conceptually agree.  And Stepanov's "Elements of Programming" 9.1
> has the same thought: Writability as an assignment to _sink_(x), while
> _sink_(x) is not necessarily a "real" reference to `x`.
>=20
> Ah, I see... We should be able to specialize iterator_traits to unblock
> proxy iterators...

And actually we already have done this for input iterators and output itera=
tors.  We just have this legacy requirement hanging around that forward ite=
rators (and bi and rand) must return a value_type& from operator*() (const =
value_type& for non-mutable variants).  The T& return from forward iterator=
 operator*() is kind of like dandelions.  It kind of looks pretty.  And it =
is very hard to get rid of. :-)  But I think we should make an effort to do=
 so.

libc++ is a working implementation where vector<bool>::[const_]iterator wor=
ks with everything in <algorithm>; some, but not enough of the algorithms a=
t greatly increased performance.  I.e. there is shipping implementation pra=
ctice to back up all of my hot air.  And we still need to deal with the fac=
t that vector<bool> has a terrible name.

Howard

--=20

---=20
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 e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.

.
