220 5853 <7424D479-A80A-4831-93CF-AD9166C0BC63@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 20:09:45 -0400
Lines: 40
Approved: news@gmane.org
Message-ID: <7424D479-A80A-4831-93CF-AD9166C0BC63@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> <CAGsORuCDbX4k2ZOcnoR1QwfQoain5anNrm1as5wvpe38Vg=iow@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
X-Trace: ger.gmane.org 1377562188 20973 80.91.229.3 (27 Aug 2013 00:09:48 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Tue, 27 Aug 2013 00:09:48 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCK2HM4L6YERBTO456IAKGQE63UXB2A@isocpp.org Tue Aug 27 02:09:51 2013
Return-path: <std-proposals+bncBCK2HM4L6YERBTO456IAKGQE63UXB2A@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-bk0-f69.google.com ([209.85.214.69])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCK2HM4L6YERBTO456IAKGQE63UXB2A@isocpp.org>)
	id 1VE6r0-000567-KA
	for gclcip-std-proposals@m.gmane.org; Tue, 27 Aug 2013 02:09:50 +0200
Original-Received: by mail-bk0-f69.google.com with SMTP id na10sf4353109bkb.0
        for <gclcip-std-proposals@m.gmane.org>; Mon, 26 Aug 2013 17:09:50 -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;
        bh=rttXL/SuTs0td3knhFQnUW7xhCBlM8Ly/SFjagSI/30=;
        b=nllSVIRdRfAejI+3KmzoHsHfBlywWWyF4Mj/VWKYonWjk4WskjIewgtfv0tN5oNARE
         9ff7vFTU9FigwR2t0niR9bwU12/FBTnDa5edOa3YgbQWtOAXCAYCX2A2f4vvid+sVzyH
         194eta0w4AtJITUOttzuaNKAIBP9sDdbAyAD09go4LKIhBE5AExg10cY/rod/T0Up3Ak
         ILNsOBSiPKxzjaU+VAHy+r7zxKYaBn7Qq0yfAhWfrmYGlDQpLjCo/4y9Q1DcnTkVUsGq
         KuhX2WL8imYkASmuSxL/rvoDDXqeie+RVnXlWfjFABAethsVbg4uiQzJPx+ZNcrExokX
         6wvw==
X-Received: by 10.180.91.17 with SMTP id ca17mr3748495wib.3.1377562190022;
        Mon, 26 Aug 2013 17:09:50 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.180.198.170 with SMTP id jd10ls1024786wic.35.gmail; Mon, 26
 Aug 2013 17:09:49 -0700 (PDT)
X-Received: by 10.204.62.201 with SMTP id y9mr11997400bkh.23.1377562189010;
        Mon, 26 Aug 2013 17:09:49 -0700 (PDT)
Original-Received: from mail-qe0-x22d.google.com (mail-qe0-x22d.google.com [2607:f8b0:400d:c02::22d])
        by mx.google.com with ESMTPS id i5si1375954bkr.270.1969.12.31.16.00.00
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Mon, 26 Aug 2013 17:09:49 -0700 (PDT)
Received-SPF: pass (google.com: domain of howard.hinnant@gmail.com designates 2607:f8b0:400d:c02::22d as permitted sender) client-ip=2607:f8b0:400d:c02::22d;
Original-Received: by mail-qe0-f45.google.com with SMTP id 8so1505711qea.18
        for <std-proposals@isocpp.org>; Mon, 26 Aug 2013 17:09:47 -0700 (PDT)
X-Received: by 10.229.99.193 with SMTP id v1mr4799882qcn.32.1377562187817;
        Mon, 26 Aug 2013 17:09:47 -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 v9sm1315693qat.5.1969.12.31.16.00.00
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Mon, 26 Aug 2013 17:09:46 -0700 (PDT)
In-Reply-To: <CAGsORuCDbX4k2ZOcnoR1QwfQoain5anNrm1as5wvpe38Vg=iow@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:c02::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:5853
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/5853>


On Aug 26, 2013, at 7:57 PM, Zhihao Yuan <zy@miator.net> wrote:

> On Mon, Aug 26, 2013 at 7:22 PM, Howard Hinnant
> <howard.hinnant@gmail.com> wrote:
>> Question for Zhihao:
>> 
>> Why does forward iterator's operator*() have to return a value_type& ?
>> 
>> I'm well aware that this is what C++98/03/11 requires.  That's not what I'm asking.  I'm asking what is the benefit of this requirement in the C++1y context?  What problem does this requirement solve?
> 
> Afaics, it makes the pointed object modifiable.

But today, I can do:

std::vector<boo> v(1);
*v.begin() = true;

And yet vector<bool>::iterator::operator*() isn't returning a bool&.  But I am still modifying the referenced object.

>  And move_iterator
> significantly benefits from it.  (Here is something I'm not sure:
> move_iterator requires only InputIterator, while dereferencing an
> InputIterator may return anything convertible to T -- is there anything
> broken here?)

Yes.

http://cplusplus.github.io/LWG/lwg-active.html#2106

Howard

-- 

--- 
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

.
