220 34056 <CAGg_6+M+fCjSm5RQGStWXaAegpx0kZsnNw=eojvoqnw6SCh-tQ@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Nevin Liber <nevin@eviloverlord.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: std::vector<T, Alloc>::expand_uninitialized
Date: Tue, 22 Aug 2017 09:52:51 -0500
Lines: 82
Approved: news@gmane.org
Message-ID: <CAGg_6+M+fCjSm5RQGStWXaAegpx0kZsnNw=eojvoqnw6SCh-tQ@mail.gmail.com>
References: <405bc3a4-4fbf-41af-b213-b24894ba2f6e@isocpp.org>
 <0304ee31-d873-25a5-1ff9-3364e76dff67@gmail.com> <CAKiZDp151PprK6Q_Gajnyh0URotphRK98M154jjPQEjAUOkX4Q@mail.gmail.com>
 <38511f1a-5d75-4c95-a240-89e19a03bbe6@isocpp.org> <2e2acdaf-58ae-4be9-a541-28d0291a09d4@isocpp.org>
 <c0fab574-25e3-4e14-8728-f4af550d6626@isocpp.org> <CAFk2RUb7vE7YSChtdbfNfYm3V1ZkJWAmoRfYWjT7ApnvHwS3Hw@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="94eb2c1197ba528341055758c2d0"
X-Trace: blaine.gmane.org 1503413614 20873 195.159.176.226 (22 Aug 2017 14:53:34 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Tue, 22 Aug 2017 14:53:34 +0000 (UTC)
To: "std-proposals@isocpp.org" <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCE35H5S6IDBB3MK6HGAKGQEGSIUZVY@isocpp.org Tue Aug 22 16:53:30 2017
Return-path: <std-proposals+bncBCE35H5S6IDBB3MK6HGAKGQEGSIUZVY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-qt0-f200.google.com ([209.85.216.200])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCE35H5S6IDBB3MK6HGAKGQEGSIUZVY@isocpp.org>)
	id 1dkAYa-00054g-5t
	for gclcip-std-proposals@m.gmane.org; Tue, 22 Aug 2017 16:53:28 +0200
Original-Received: by mail-qt0-f200.google.com with SMTP id c15sf76211962qta.14
        for <gclcip-std-proposals@m.gmane.org>; Tue, 22 Aug 2017 07:53:35 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1503413614; cv=pass;
        d=google.com; s=arc-20160816;
        b=cBjAE/ozgUYESr2vS5fSgQR9pJK14DlEZBSXfKEXuH6fKGL7bLioUaXtCTbg9EPrI8
         UozrFXUA3/JzYtBOaknx2nVKdk5Qy0SPX2p0ai7ZlZeReiHb9VWjocw9/AnqIM4d2BsQ
         PSMU9BQAPeWfTowxUOqjRpnGJCL8gUScR1gJbgxaw72ZVfQAaZE5INWN9Q6JoCSlIYfN
         rub9GKRDcReT9zVtUzWU44RMvi2RV/43NRGmp8/KHzVligktMfyOa7lWogyLjLoR3Z1K
         F/n53lzZN641owJOOf9Art1PVj0x16JxfCUwowM1l09v/NNjCXMMlXJCNOsin0sZ9EJG
         +Cww==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:reply-to:to:subject:message-id:date
         :from:references:in-reply-to:sender:mime-version
         :arc-authentication-results:arc-message-signature
         :arc-authentication-results;
        bh=o4GHbx4BKoYsN3mo2SuaV9bl79mXZXlS/SNPILgYnnM=;
        b=A29hj8mqi7mJ+V6AEiRjDXHo+RsnJHe2sgIu2RB5EJKRDFgtDHscS1rGiukAc0lTXB
         r8bqEDxCB/H0FSD0DILQRkJy6F16n/aw2oX5vjd+MrQPTutDy+akWONvyjab1wtbIRsU
         pkudMsXjQa78xdRKv6cYvnbeRu5f87Cye70B4mSYCX3WIVboSSSTvcDoxnSPbn03z2wd
         rw+jNZ9wjDm8ovsarpp4nfAQQJo5cYZGKogoXfBzeOfNvh/XG0Rb5sazvgt9oB68xcgk
         GZ1Naq7Iq+5LGFUXjyXXyH3qiokuJTu0byUxRsD52yzcLh6yrWydRBB2jEVM2KICf23H
         fK3g==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=ox2yF5Kt;
       spf=pass (google.com: domain of nliber@gmail.com designates 2607:f8b0:400e:c05::233 as permitted sender) smtp.mailfrom=nliber@gmail.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state: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:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=o4GHbx4BKoYsN3mo2SuaV9bl79mXZXlS/SNPILgYnnM=;
        b=rrUSBr1UCBRl35r/W1wGutv+3vk7SqX043OWVHOnHgL6tmx0FfKv2NQCit2zxA/5P6
         w8HlhwoZ36OLZB8+W1QlhuMcqTlEICUsc+cG3Ogj+Mz+penYWsqznA/zjKTIm7hppFZM
         h00yEMWF+UJbF9frMvnUgPkeeSl/Lvpk0XXoNM/4ub5f23eKtputRBJm2X407d3WlvT8
         Og9Vuc3vuyZPobhd+ctNAOqfhw3N4asbkRdAbekLZGq6YuH9lH7IPwLbY4a56TvTg9cL
         8DWQ5l4RxZPhqigJfT/d3UaOXoKlwKbZOWYwNtA4u5hDBToNUh7nKvANLUaylR/XrS4J
         /Yag==
X-Gm-Message-State: AHYfb5jPliKJ5rTZ9uP297irSRDgDUDA7+8kU1Wq/J4Cc+0W8/o8jB9i
	DBVZsp5nmIrNng==
X-Received: by 10.200.43.120 with SMTP id 53mr601890qtv.97.1503413614886;
        Tue, 22 Aug 2017 07:53:34 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.36.9.209 with SMTP id 200ls7416320itm.15.gmail; Tue, 22 Aug
 2017 07:53:33 -0700 (PDT)
X-Received: by 10.98.90.131 with SMTP id o125mr189413pfb.222.1503413613092;
        Tue, 22 Aug 2017 07:53:33 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1503413613; cv=none;
        d=google.com; s=arc-20160816;
        b=xXJ7TXV0GjO6od8EVCNE5lRRqpaFTlAMYUFWucYHP7/Pz0DzVqWz3CP6Ag51fbozCU
         Y2jICwROhE92dIEbnL8YHDwb81zNztpD1XTUiYx/DNDU+CWsS1QNFq5hwHIjE7qrgojg
         3ga76MyeduMu0b+MqXIlzlLpwqk3S0Gnq0nIIfe8eg+MWKmuPjkit8KVZ1+6ZFMp2Jz3
         znirObl8FF8sJagrc+lgUjsXmCmZ5A4eY/PCBdWf/gbavWwF25e+P9KcUWC5NLk61LTC
         /UX3pxZajTP2G8MSuZ0cNBIS6bVq8AMs6yj0LRjz22mJ83yiKKuw+24k36ltrs5fkJB0
         cSgw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=to:subject:message-id:date:from:references:in-reply-to:sender
         :mime-version:dkim-signature:arc-authentication-results;
        bh=l/Sdx4oH7OJXOen4JjMTdqAYge2QsuEQ8FpihyGWUr8=;
        b=T6bm6RyHPUsQ9hj4l6VFNQ9IwvpcZyEqsQVqN9CW7GAJJ0PeOkbA5nISHGI5o3Y+t9
         dtqCOP+8+syA2RpMMbQawqgH//NZxOqedpPhfk49UxoAI66EfPGyP3Zzj0FVw3jqReVK
         nDESYZe/OiJgGnSKH5qckDWTFxdNgO4eQMLYzTGuGaol9Isp7LmWBtPoDnCUY1iUGucC
         E9wuGgkM64i83q9kaTRJsYG/OV220+iBx2ZZNO28fd2jiTYLUG9nW/ZkE4W8xCVdgcBb
         S94Gv3sl2P8mn9D8QHyLbQl27S40LjoF0KQ6VIZeU/yDjBKqxFvT4urEyyhqkNPbayq4
         g5nQ==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=ox2yF5Kt;
       spf=pass (google.com: domain of nliber@gmail.com designates 2607:f8b0:400e:c05::233 as permitted sender) smtp.mailfrom=nliber@gmail.com
Original-Received: from mail-pg0-x233.google.com (mail-pg0-x233.google.com. [2607:f8b0:400e:c05::233])
        by mx.google.com with ESMTPS id u16si9805657plk.164.2017.08.22.07.53.33
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Tue, 22 Aug 2017 07:53:33 -0700 (PDT)
Received-SPF: pass (google.com: domain of nliber@gmail.com designates 2607:f8b0:400e:c05::233 as permitted sender) client-ip=2607:f8b0:400e:c05::233;
Original-Received: by mail-pg0-x233.google.com with SMTP id s14so11757328pgs.1
        for <std-proposals@isocpp.org>; Tue, 22 Aug 2017 07:53:33 -0700 (PDT)
X-Received: by 10.84.175.132 with SMTP id t4mr1085887plb.195.1503413612477;
 Tue, 22 Aug 2017 07:53:32 -0700 (PDT)
Original-Sender: nliber@gmail.com
Original-Received: by 10.100.133.80 with HTTP; Tue, 22 Aug 2017 07:52:51 -0700 (PDT)
In-Reply-To: <CAFk2RUb7vE7YSChtdbfNfYm3V1ZkJWAmoRfYWjT7ApnvHwS3Hw@mail.gmail.com>
X-Original-Sender: nevin@eviloverlord.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com header.s=20161025 header.b=ox2yF5Kt;       spf=pass
 (google.com: domain of nliber@gmail.com designates 2607:f8b0:400e:c05::233 as
 permitted sender) smtp.mailfrom=nliber@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: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:34056
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/34056>

--94eb2c1197ba528341055758c2d0
Content-Type: text/plain; charset="UTF-8"

On Tue, Aug 22, 2017 at 9:34 AM, Ville Voutilainen <
ville.voutilainen@gmail.com> wrote:

> Trying to fix vector's performance
> problems one by one runs the risk of breaking vector's class
> invariants, which (all of them) somebody
> somewhere is bound to rely on, so I'd expect fair amounts of
> resistance to such an approach.


Nicol isn't breaking vector's invariants with his proposal.  He is looking
to add default-initialization in addition to the normal zero-initialization
usually performed with allocators; for classes with default constructors,
there is no difference.  One thing that bugs me about his proposal is that
he is changing allocator_traits from a class which always forwards to the
allocator if it can into a class which will always perform
default-initialization in this one case.

This isn't to say that there shouldn't be a low-level utility, but I'd
still like to have this functionality as well, without having to resort to
a custom allocator, and definitely without breaking vector's invariants.
-- 
 Nevin ":-)" Liber  <mailto:nevin@eviloverlord.com>  +1-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.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAGg_6%2BM%2BfCjSm5RQGStWXaAegpx0kZsnNw%3Deojvoqnw6SCh-tQ%40mail.gmail.com.

--94eb2c1197ba528341055758c2d0
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Tue, Aug 22, 2017 at 9:34 AM, Ville Voutilainen <span d=
ir=3D"ltr">&lt;<a href=3D"mailto:ville.voutilainen@gmail.com" target=3D"_bl=
ank">ville.voutilainen@gmail.com</a>&gt;</span> wrote:<br><div class=3D"gma=
il_extra"><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" styl=
e=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Trying =
to fix vector&#39;s performance<br>
problems one by one runs the risk of breaking vector&#39;s class<br>
invariants, which (all of them) somebody<br>
somewhere is bound to rely on, so I&#39;d expect fair amounts of<br>
resistance to such an approach.</blockquote><div><br></div><div>Nicol isn&#=
39;t breaking vector&#39;s invariants with his proposal.=C2=A0 He is lookin=
g to add default-initialization in addition to the normal zero-initializati=
on usually performed with allocators; for classes with default constructors=
, there is no difference.=C2=A0 One thing that bugs me about his proposal i=
s that he is changing allocator_traits from a class which always forwards t=
o the allocator if it can into a class which will always perform default-in=
itialization in this one case.</div><div><br></div><div>This isn&#39;t to s=
ay that there shouldn&#39;t be a low-level utility, but I&#39;d still like =
to have this functionality as well, without having to resort to a custom al=
locator, and definitely without breaking vector&#39;s invariants.</div></di=
v>-- <br><div class=3D"gmail_signature" data-smartmail=3D"gmail_signature">=
<div dir=3D"ltr"><div><div dir=3D"ltr"><div>=C2=A0Nevin &quot;:-)&quot; Lib=
er=C2=A0 &lt;mailto:<a href=3D"mailto:nevin@eviloverlord.com" target=3D"_bl=
ank">nevin@eviloverlord.com</a>&gt; =C2=A0+1-847-691-1404</div></div></div>=
</div></div>
</div></div>

<p></p>

-- <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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CAGg_6%2BM%2BfCjSm5RQGStWXaAegpx0kZsn=
Nw%3Deojvoqnw6SCh-tQ%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfoote=
r">https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAGg_6%2BM%=
2BfCjSm5RQGStWXaAegpx0kZsnNw%3Deojvoqnw6SCh-tQ%40mail.gmail.com</a>.<br />

--94eb2c1197ba528341055758c2d0--

.
