220 5869 <521C74C5.6060801@beamways.com> article
Path: news.gmane.org!not-for-mail
From: Bengt Gustafsson <bengt.gustafsson@beamways.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Remove vector<bool>?
Date: Tue, 27 Aug 2013 11:43:33 +0200
Lines: 55
Approved: news@gmane.org
Message-ID: <521C74C5.6060801@beamways.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
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
X-Trace: ger.gmane.org 1377596610 2513 80.91.229.3 (27 Aug 2013 09:43:30 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Tue, 27 Aug 2013 09:43:30 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCRIRSPDTQIRBQPJ6GIAKGQED6WXLSY@isocpp.org Tue Aug 27 11:43:31 2013
Return-path: <std-proposals+bncBCRIRSPDTQIRBQPJ6GIAKGQED6WXLSY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-bk0-f72.google.com ([209.85.214.72])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCRIRSPDTQIRBQPJ6GIAKGQED6WXLSY@isocpp.org>)
	id 1VEFoA-0002KN-Pk
	for gclcip-std-proposals@m.gmane.org; Tue, 27 Aug 2013 11:43:30 +0200
Original-Received: by mail-bk0-f72.google.com with SMTP id mx10sf4891214bkb.11
        for <gclcip-std-proposals@m.gmane.org>; Tue, 27 Aug 2013 02:43:30 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=google.com; s=20120113;
        h=message-id:date:from:user-agent:mime-version:to:subject:references
         :in-reply-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=81XDSJOUtwmviSvlZWViLXfGPHCujJkcv3UUKoIFlBA=;
        b=a+hsEXglNXohcRixEVoRQS2pygeE7xu2flDit+9vNfJblIsAQLWTFrpqVd9wtELRYr
         ZvKorCkDEUxwmgzv+wx+jAuP40Fj6AMJtt6xwwcVjp75o1YZcjFYaOQAAr0plsleMPV2
         FCNn4jDZ6uWKUzMOvilIgP243pUqAdEfCv4zoF3P1ze56YOsFEkYaAzydxACU61n2sLj
         f5JcgUeqO4nVngZQygBUfDrtD/tXuR/AQnNT8mUktdZqme7L8kOrClvK0UfP/4ZaATa9
         6aLP4bignAt9Et2vQTK4Izv4UOyiyeBuqqdNgWhyhDXRez5TYbRmcR0scFQBaL4bg0EK
         9VfQ==
X-Received: by 10.152.20.229 with SMTP id q5mr4409878lae.3.1377596609978;
        Tue, 27 Aug 2013 02:43:29 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.152.21.229 with SMTP id y5ls185170lae.15.gmail; Tue, 27 Aug
 2013 02:43:28 -0700 (PDT)
X-Received: by 10.152.19.70 with SMTP id c6mr6549878lae.25.1377596608883;
        Tue, 27 Aug 2013 02:43:28 -0700 (PDT)
Original-Received: from vsp02.s.thehostingplatform.com (vsp02.s.thehostingplatform.com. [213.180.89.90])
        by mx.google.com with ESMTPS id z2si3964265lad.123.1969.12.31.16.00.00
        (version=TLSv1 cipher=RC4-SHA bits=128/128);
        Tue, 27 Aug 2013 02:43:28 -0700 (PDT)
Received-SPF: neutral (google.com: 213.180.89.90 is neither permitted nor denied by best guess record for domain of bengt.gustafsson@beamways.com) client-ip=213.180.89.90;
Original-Received: from [192.168.10.76] (unknown [213.88.189.38])
	by vsp02.s.thehostingplatform.com (Halon Mail Gateway) with ESMTPSA
	for <std-proposals@isocpp.org>; Tue, 27 Aug 2013 11:43:27 +0200 (CEST)
User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8
In-Reply-To: <CAGsORuCDbX4k2ZOcnoR1QwfQoain5anNrm1as5wvpe38Vg=iow@mail.gmail.com>
X-Original-Sender: bengt.gustafsson@beamways.com
X-Original-Authentication-Results: mx.google.com;       spf=neutral
 (google.com: 213.180.89.90 is neither permitted nor denied by best guess
 record for domain of bengt.gustafsson@beamways.com) smtp.mail=bengt.gustafsson@beamways.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:5869
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/5869>


Zhihao Yuan skrev 2013-08-27 01:57:
> 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.  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?)
>
No, he must be refering to something else, as the return value of 
vector<bool>::iterator::operator* does indeed make the pointed object 
modifiable.

I don't like when people speak in riddles to make other people feel like 
idiots! Please instead try to explain the issue at hand as clearly as 
you can.

The prime example I have been given of the badness of the vector<bool> 
specialization is that it does not have a .data() method. So be it, but 
in what case is using .data() preferred to using iterators?

The other problem was that some stl algorithms are very slow when the 
input iterators are for vector<bool>, but when I suggest a simple 
solution that would instead make them faster than their counterparts it 
is immediately shot down for not being orthogonal enough.

I don't really see the relevance of the argument that "anyone who needs 
a denser vector<bool> than the unspecialized one can always use 
bit_vector". This ASSUMES that programmers that make very simple use of 
a vector of bits aware of this new, later added class. At the same time 
the reason for getting rid of the specialized vector<bool> seems to be 
that we CAN'T ASSUME that programmers who are doing rather more complex 
programming know that vector<bool> is special, even though this is 
already pointed out in current textbooks.

I do think that the specialization was a mistake from the beginning, but 
I think that we should move on with an apology and concentrate on making 
it perform as expected from a packed representation, which requires the 
API I mentioned before. Also I think that the suggestion to remove it 
would never pass the committe scrutinization.

-- 

--- 
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/.

.
