220 5913 <CAGg_6+PX_CJ3277QuokXLnryEka9t_RBmOcRYcYn9Xm-6YNHmQ@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Nevin Liber <nevin@eviloverlord.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Remove vector<bool>?
Date: Tue, 27 Aug 2013 20:15:59 -0500
Lines: 91
Approved: news@gmane.org
Message-ID: <CAGg_6+PX_CJ3277QuokXLnryEka9t_RBmOcRYcYn9Xm-6YNHmQ@mail.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>
 <521C74C5.6060801@beamways.com> <a65969ec-169a-474a-8770-318c57da6a2c@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=047d7b5daca0cd4e7504e4f7bd9f
X-Trace: ger.gmane.org 1377652599 29714 80.91.229.3 (28 Aug 2013 01:16:39 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 28 Aug 2013 01:16:39 +0000 (UTC)
To: "std-proposals@isocpp.org" <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCE35H5S6IDBB5466WIAKGQESPSAZNA@isocpp.org Wed Aug 28 03:16:42 2013
Return-path: <std-proposals+bncBCE35H5S6IDBB5466WIAKGQESPSAZNA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-vc0-f197.google.com ([209.85.220.197])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCE35H5S6IDBB5466WIAKGQESPSAZNA@isocpp.org>)
	id 1VEUNE-0004OB-MF
	for gclcip-std-proposals@m.gmane.org; Wed, 28 Aug 2013 03:16:40 +0200
Original-Received: by mail-vc0-f197.google.com with SMTP id ha11sf6033736vcb.4
        for <gclcip-std-proposals@m.gmane.org>; Tue, 27 Aug 2013 18:16:39 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=mime-version:sender:in-reply-to:references:from:date:message-id
         :subject: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=XGQ/62wbHzsKXXqjAjkCgQmf6WHDLnJEIuLctmJvGxE=;
        b=LFt4qPNoI7suO3xoWSB1q5x5aOKy8qCOmwrjhKEDISNEggSNweIU8BXuC93oRBzTgR
         BHp0KtiEBRBULTZBzWEDfupkj0wJUdy14y8sniX8fyj86wDH9GbAtVupfwDDNuUMVZ2N
         AX0gvgleI4lKgGJn6nkLRMw9KQj8jLcYb1GT6zAsKYm6gOP58Z/7YrrkhAn1UbVmf7sr
         14UQy7lW+nrUAZ8DGNsmYzcUcHXzW1szW2Pneqd43reQI0BR1sRyWnlbvDyucWrl1zJA
         R5Ww0YFzBsD+NiJOIfEks6pjwuq5AkqK2fYjm3fcZs46Tttcww919Cirzu7NCkAZrUER
         ZzaA==
X-Received: by 10.236.166.35 with SMTP id f23mr9089621yhl.22.1377652599823;
        Tue, 27 Aug 2013 18:16:39 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.49.85.134 with SMTP id h6ls152373qez.10.gmail; Tue, 27 Aug
 2013 18:16:39 -0700 (PDT)
X-Received: by 10.224.103.73 with SMTP id j9mr22204qao.101.1377652599397;
        Tue, 27 Aug 2013 18:16:39 -0700 (PDT)
Original-Received: from mail-qe0-x22c.google.com (mail-qe0-x22c.google.com [2607:f8b0:400d:c02::22c])
        by mx.google.com with ESMTPS id l8si9484087qai.36.1969.12.31.16.00.00
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Tue, 27 Aug 2013 18:16:39 -0700 (PDT)
Received-SPF: pass (google.com: domain of nliber@gmail.com designates 2607:f8b0:400d:c02::22c as permitted sender) client-ip=2607:f8b0:400d:c02::22c;
Original-Received: by mail-qe0-f44.google.com with SMTP id 5so3094400qeb.31
        for <std-proposals@isocpp.org>; Tue, 27 Aug 2013 18:16:39 -0700 (PDT)
X-Received: by 10.49.59.44 with SMTP id w12mr26589843qeq.57.1377652599244;
 Tue, 27 Aug 2013 18:16:39 -0700 (PDT)
Original-Sender: nliber@gmail.com
Original-Received: by 10.49.3.41 with HTTP; Tue, 27 Aug 2013 18:15:59 -0700 (PDT)
In-Reply-To: <a65969ec-169a-474a-8770-318c57da6a2c@isocpp.org>
X-Original-Sender: nevin@eviloverlord.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of nliber@gmail.com designates 2607:f8b0:400d:c02::22c as permitted
 sender) smtp.mail=nliber@gmail.com;       dkim=pass header.i=@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:5913
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/5913>

--047d7b5daca0cd4e7504e4f7bd9f
Content-Type: text/plain; charset=ISO-8859-1

On 27 August 2013 18:17, Nicol Bolas <jmckesson@gmail.com> wrote:

> Because it's part of std::vector's interface. std::vector *requires* that
> this code works:
>
> vector<T> t{...};
> T* tp = &t[0];
> tp += 3;
> *tp == t[3];
>
> And that will work for all T... so long as T is not `bool`.
>
> It is not for you to decide whether this is good code or not.
>

And even of people don't like that code, surely the following is reasonable:

void DoSomething(bool& flag) { /* ... */ }

DoSomething(t[3]);
-- 
 Nevin ":-)" Liber  <mailto:nevin@eviloverlord.com>  (847) 691-1404

-- 

--- 
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/.

--047d7b5daca0cd4e7504e4f7bd9f
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">=
On 27 August 2013 18:17, Nicol Bolas <span dir=3D"ltr">&lt;<a href=3D"mailt=
o:jmckesson@gmail.com" target=3D"_blank">jmckesson@gmail.com</a>&gt;</span>=
 wrote:<br>

<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div>Because it&#39;s part of std::vector&#3=
9;s interface. std::vector *requires* that this code works:<br><br><div sty=
le=3D"background-color:rgb(250,250,250);border-color:rgb(187,187,187);borde=
r-style:solid;border-width:1px;word-wrap:break-word">

<code><div><span style>vector</span><span style=3D"color:#660">&lt;</span><=
span style>T</span><span style=3D"color:#660">&gt;</span><span style> t</sp=
an><span style=3D"color:#660">{...};</span><span style><br>T</span><span st=
yle=3D"color:#660">*</span><span style> tp </span><span style=3D"color:#660=
">=3D</span><span style> </span><span style=3D"color:#660">&amp;</span><spa=
n style>t</span><span style=3D"color:#660">[</span><span style=3D"color:#06=
6">0</span><span style=3D"color:#660">];</span><span style><br>

tp </span><span style=3D"color:#660">+=3D</span><span style> </span><span s=
tyle=3D"color:#066">3</span><span style=3D"color:#660">;</span><span style>=
<br></span><span style=3D"color:#660">*</span><span style>tp </span><span s=
tyle=3D"color:#660">=3D=3D</span><span style> t</span><span style=3D"color:=
#660">[</span><span style=3D"color:#066">3</span><span style=3D"color:#660"=
>];</span></div>

</code></div><br>And that will work for all T... so long as T is not `bool`=
..<br><br>It is not for you to decide whether this is good code or not. </di=
v></blockquote><div><br></div><div>And even of people don&#39;t like that c=
ode, surely the following is reasonable:</div>

<div><br></div><div>void DoSomething(bool&amp; flag) { /* ... */ }</div><di=
v><br></div><div>DoSomething(t[3]);</div><div>--=A0<br></div></div>=A0Nevin=
 &quot;:-)&quot; Liber=A0 &lt;mailto:<a href=3D"mailto:nevin@eviloverlord.c=
om" target=3D"_blank">nevin@eviloverlord.com</a>&gt;=A0 (847) 691-1404
</div></div>

<p></p>

-- <br />
&nbsp;<br />
--- <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 std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

--047d7b5daca0cd4e7504e4f7bd9f--

.
