220 4741 <51A6EC7F.4090308@wanadoo.fr> article
Path: news.gmane.org!not-for-mail
From: "Vicente J. Botet Escriba" <vicente.botet@wanadoo.fr>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Remove vector<bool>?
Date: Thu, 30 May 2013 08:06:55 +0200
Lines: 194
Approved: news@gmane.org
Message-ID: <51A6EC7F.4090308@wanadoo.fr>
References: <CAGsORuDQdeWAO5yjA6=h0hW9Y0Sj4F1gcHB61udw5JFmtx+g4Q@mail.gmail.com> <CAGg_6+O9XJucMxwEhU+50Dzx0Tz7XRK0cWyrkUHuPSoEz9TqEw@mail.gmail.com> <e59c2a57-6068-4098-8667-5d086b2961fd@isocpp.org> <7371f4b8-8c47-4f17-af1e-902a5c8b17e4@isocpp.org> <FF769E17-643C-47FE-8A3E-D28436A4B9A6@gmail.com> <51A638CF.5050905@wanadoo.fr> <CAGg_6+OS21ww71D-94NO0f0pLUDo6fGUULdZ6KkVc0aypwf_uw@mail.gmail.com> <51A670DC.2010102@wanadoo.fr>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative;
 boundary="------------040209080501090604030800"
X-Trace: ger.gmane.org 1369894020 29132 80.91.229.3 (30 May 2013 06:07:00 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Thu, 30 May 2013 06:07:00 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDH67CONY4PBBAGZTOGQKGQEMLFT27Y@isocpp.org Thu May 30 08:06:57 2013
Return-path: <std-proposals+bncBDH67CONY4PBBAGZTOGQKGQEMLFT27Y@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-fa0-f70.google.com ([209.85.161.70])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDH67CONY4PBBAGZTOGQKGQEMLFT27Y@isocpp.org>)
	id 1Uhw0n-0003jy-A6
	for gclcip-std-proposals@m.gmane.org; Thu, 30 May 2013 08:06:57 +0200
Original-Received: by mail-fa0-f70.google.com with SMTP id w1sf7903832fad.1
        for <gclcip-std-proposals@m.gmane.org>; Wed, 29 May 2013 23:06:57 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=google.com; s=20120113;
        h=x-beenthere: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:x-google-group-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe:content-type;
        bh=kPtPaUrjiE6cUzBRTuSN5OgMqZA8tGTNmxj5sf5VUtE=;
        b=g4a1ES0k8nVe7W014gBHnnDMkBE3Kekc8Q1wOBHKr9f4shH7RhhcpkPip+BHrLT2YK
         QBVKdx/HIOFlyZARBfiRwGtHE2EVNLHhqfdmjVOCptzjIszhTk5kpN/Q8ZhB7A3jEPJa
         zgj9+1vysfLlx75pjB21sutCytuFr2eupSK2uaot7bdk1ksDgbbO8bXuVnxol8jNJznD
         u5Rh5vtDas6zKEU1PTt6jKyvegmGKyYGiMTHUKPi0xVSYmreSJqstoI0pg2E+ZKOgcXc
         haWi76uguHHdjdcGvc1b4YXYZd0kjQvFksLmwPbrzeztb+q5I34/9QhYWCV/U1E3IWN9
         zmBg==
X-Received: by 10.180.75.133 with SMTP id c5mr2002141wiw.2.1369894017032;
        Wed, 29 May 2013 23:06:57 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.180.36.166 with SMTP id r6ls1756026wij.0.canary; Wed, 29 May
 2013 23:06:56 -0700 (PDT)
X-Received: by 10.180.212.49 with SMTP id nh17mr16942893wic.60.1369894016414;
        Wed, 29 May 2013 23:06:56 -0700 (PDT)
Original-Received: from smtp.smtpout.orange.fr (smtp06.smtpout.orange.fr. [80.12.242.128])
        by mx.google.com with ESMTP id ud14si7508233wib.19.2013.05.29.23.06.56
        for <std-proposals@isocpp.org>;
        Wed, 29 May 2013 23:06:56 -0700 (PDT)
Received-SPF: neutral (google.com: 80.12.242.128 is neither permitted nor denied by best guess record for domain of vicente.botet@wanadoo.fr) client-ip=80.12.242.128;
Original-Received: from pc4.home ([2.11.193.225])
	by mwinf5d41 with ME
	id i66v1l00P4sEqES0366vs3; Thu, 30 May 2013 08:06:56 +0200
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130509 Thunderbird/17.0.6
In-Reply-To: <51A670DC.2010102@wanadoo.fr>
X-Original-Sender: vicente.botet@wanadoo.fr
X-Original-Authentication-Results: mx.google.com;       spf=neutral
 (google.com: 80.12.242.128 is neither permitted nor denied by best guess
 record for domain of vicente.botet@wanadoo.fr) smtp.mail=vicente.botet@wanadoo.fr
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?hl=en>,
 <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?hl=en&topic=25838>,
 <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe?hl=en>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe?hl=en>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:4741
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/4741>

This is a multi-part message in MIME format.
--------------040209080501090604030800
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable

Le 29/05/13 23:19, Vicente J. Botet Escriba a =E9crit :
> Le 29/05/13 19:37, Nevin Liber a =E9crit :
>> On 29 May 2013 12:20, Vicente J. Botet Escriba=20
>> <vicente.botet@wanadoo.fr <mailto:vicente.botet@wanadoo.fr>> wrote:
>>
>>     Le 28/05/13 22:12, Howard Hinnant a =E9crit :
>>>     On May 28, 2013, at 4:00 PM, Nicol Bolas<jmckesson@gmail.com>  <mai=
lto:jmckesson@gmail.com>  wrote:
>>>
>>>>     Personally, I agree with Howard; we should add a class that has al=
l of this functionality (presumably with some degree of required sizing) th=
at would be a drop-in replacement for those who need the sizing features of=
 vector<bool>. But the question remains: even with a drop-in replacement, h=
ow much code will be broken because of this?
>>>     Model this after the auto_ptr -> unique_ptr transition:
>>>
>>>     Step 1:  Introduce bit_vector (or whatever) and deprecate the vecto=
r<bool> specialization.  /Somehow/ motivate people to migrate.
>>     I think that we will need also to add a std::*new_*vector<T> that
>>     behaves like std::vector<T> but doesn't have the bool
>>     specialization and
>>
>>
>> * I'd hate to use a code base that had two different, unrelated types=20
>> for doing the exact same thing, since ultimately these things end up=20
>> interfaces.  Actually, I already have that, as people are trying to=20
>> migrate from Boost over to std (such as shared_ptr), and it is=20
>> anything but easy (because we are dependent on libraries developed=20
>> for/by other groups, and changing those interfaces is a scheduling=20
>> nightmare).
> You are right. What we would need is 'single' type that behaves as the=20
> current vector<T> except for bool and that behaves as vector<bool> if=20
> vector was not specialized. I don't know if we can specialize an alias=20
> and if the following is correct
>
> template <typename T, typename Allocator>
> class new_vector { the same definition as vector<T, Allocator> now };
>
> template <typename T, typename Allocator>
> alias vector=3D new_vector<T, Allocator> ;
>
> template < typename Allocator>
> class vector<bool, Allocator> { the same definition as now } ;
>
> If this is correct,=20

Hrr, It seems that we can not specialize alias templates.

Vicente

--=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/?hl=3Den.



--------------040209080501090604030800
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<html>
  <head>
    <meta content=3D"text/html; charset=3DISO-8859-1"
      http-equiv=3D"Content-Type">
  </head>
  <body bgcolor=3D"#FFFFFF" text=3D"#000000">
    <div class=3D"moz-cite-prefix">Le 29/05/13 23:19, Vicente J. Botet
      Escriba a &eacute;crit&nbsp;:<br>
    </div>
    <blockquote cite=3D"mid:51A670DC.2010102@wanadoo.fr" type=3D"cite">
      <meta content=3D"text/html; charset=3DISO-8859-1"
        http-equiv=3D"Content-Type">
      <div class=3D"moz-cite-prefix">Le 29/05/13 19:37, Nevin Liber a
        &eacute;crit&nbsp;:<br>
      </div>
      <blockquote
cite=3D"mid:CAGg_6+OS21ww71D-94NO0f0pLUDo6fGUULdZ6KkVc0aypwf_uw@mail.gmail.=
com"
        type=3D"cite">On 29 May 2013 12:20, Vicente J. Botet Escriba <span
          dir=3D"ltr">&lt;<a moz-do-not-send=3D"true"
            href=3D"mailto:vicente.botet@wanadoo.fr" target=3D"_blank">vice=
nte.botet@wanadoo.fr</a>&gt;</span>
        wrote:<br>
        <div class=3D"gmail_quote">
          <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div>
              <div>Le 28/05/13 22:12, Howard Hinnant a &eacute;crit&nbsp;:<=
br>
              </div>
              <div class=3D"im">
                <blockquote type=3D"cite">
                  <pre>On May 28, 2013, at 4:00 PM, Nicol Bolas <a moz-do-n=
ot-send=3D"true" href=3D"mailto:jmckesson@gmail.com" target=3D"_blank">&lt;=
jmckesson@gmail.com&gt;</a> wrote:

</pre>
                  <blockquote type=3D"cite">
                    <pre>Personally, I agree with Howard; we should add a c=
lass that has all of this functionality (presumably with some degree of req=
uired sizing) that would be a drop-in replacement for those who need the si=
zing features of vector&lt;bool&gt;. But the question remains: even with a =
drop-in replacement, how much code will be broken because of this?
</pre>
                  </blockquote>
                  <pre>Model this after the auto_ptr -&gt; unique_ptr trans=
ition:

Step 1:  Introduce bit_vector (or whatever) and deprecate the vector&lt;boo=
l&gt; specialization.  /Somehow/ motivate people to migrate.</pre>
                </blockquote>
              </div>
              I think that we will need also to add a std::<b>new_</b>vecto=
r&lt;T&gt;



              that behaves like std::vector&lt;T&gt; but doesn't have
              the bool specialization and<br>
            </div>
          </blockquote>
        </div>
      </blockquote>
      <blockquote
cite=3D"mid:CAGg_6+OS21ww71D-94NO0f0pLUDo6fGUULdZ6KkVc0aypwf_uw@mail.gmail.=
com"
        type=3D"cite">
        <div class=3D"gmail_quote">
          <div><br>
            * I'd hate to use a code base that had two different,
            unrelated types for doing the exact same thing, since
            ultimately these things end up interfaces.&nbsp; Actually, I
            already have that, as people are trying to migrate from
            Boost over to std (such as shared_ptr), and it is anything
            but easy (because we are dependent on libraries developed
            for/by other groups, and changing those interfaces is a
            scheduling nightmare).<br>
          </div>
        </div>
      </blockquote>
      You are right. What we would need is 'single' type that behaves as
      the current vector&lt;T&gt; except for bool and that behaves as
      vector&lt;bool&gt; if vector was not specialized. I don't know if
      we can specialize an alias and if the following is correct<br>
      <br>
      template &lt;typename T, typename Allocator&gt;<br>
      class new_vector { the same definition as vector&lt;T,
      Allocator&gt; now };<br>
      <br>
      template &lt;typename T, typename Allocator&gt;<br>
      alias vector=3D new_vector&lt;T, Allocator&gt; ;<br>
      <br>
      template &lt; typename Allocator&gt;<br>
      class vector&lt;bool, Allocator&gt; { the same definition as now }
      ;<br>
      <br>
      If this is correct, </blockquote>
    <br>
    Hrr, It seems that we can not specialize alias templates.<br>
    <br>
    Vicente<br>
  </body>
</html>

<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/?hl=3Den">http://groups.google.com/a/isocpp.org/group/std-pro=
posals/?hl=3Den</a>.<br />
&nbsp;<br />
&nbsp;<br />

--------------040209080501090604030800--

.
