220 34915 <20171014160909.GB1546@fukushima.lysator.liu.se> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Magnus Fromreide <magfr@lysator.liu.se>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Thoughts on more methods towards containers in
 the future
Date: Sat, 14 Oct 2017 18:09:09 +0200
Lines: 25
Approved: news@gmane.org
Message-ID: <20171014160909.GB1546@fukushima.lysator.liu.se>
References: <0cc942cf-a217-4175-98b0-b466ac224dc7@isocpp.org>
 <b50be367-9a0c-4d62-a392-d2b4471d7403@isocpp.org>
 <e5065ef4-4802-4241-8357-cfb93ba25bae@isocpp.org>
 <e6b61d03-a64e-48fd-81b5-5a5f937f6d1a@isocpp.org>
 <7e04a500-ba3a-432a-a844-7d4def1fb739@isocpp.org>
 <CADtNNhgCeGu71ZU864hhiyvgNp3eFvh79HFGiVBJdaeSXDVQJA@mail.gmail.com>
 <5c1bc3ef-c3a2-4406-8a7a-f82e12155386@isocpp.org>
 <69a588d5-de2a-4be2-8add-9685d0b9a230@isocpp.org>
 <405f3ea9-d886-4c3f-9543-a276f8214974@isocpp.org>
 <02fc9853-e388-4eb3-8db3-de4e0a689056@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: blaine.gmane.org 1507997360 25988 195.159.176.226 (14 Oct 2017 16:09:20 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Sat, 14 Oct 2017 16:09:20 +0000 (UTC)
User-Agent: Mutt/1.5.23 (2014-03-12)
Cc: euloanty@live.com
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDELLREETMBRBJ7NRDHQKGQEZGH4E3I@isocpp.org Sat Oct 14 18:09:13 2017
Return-path: <std-proposals+bncBDELLREETMBRBJ7NRDHQKGQEZGH4E3I@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-lf0-f72.google.com ([209.85.215.72])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDELLREETMBRBJ7NRDHQKGQEZGH4E3I@isocpp.org>)
	id 1e3Ozp-0004xJ-Jf
	for gclcip-std-proposals@m.gmane.org; Sat, 14 Oct 2017 18:09:05 +0200
Original-Received: by mail-lf0-f72.google.com with SMTP id 90sf2988399lfs.12
        for <gclcip-std-proposals@m.gmane.org>; Sat, 14 Oct 2017 09:09:13 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1507997353; cv=pass;
        d=google.com; s=arc-20160816;
        b=mpr+zzxpQP6FIyXPXnSdnQGNqBhPONGetUjodGbtNrj6nAee+loyrurVy442e5758X
         1H/NRNnKINMwSb5jUXDqaRtSIuAZQacn9Gz2izODkaC5hfehKR868fNQ1tPask2Pq6Ik
         XtSrkAwabW3oPUFpevoD7BqbpRmygyUOaDc/Lupvph1OaTyNQrtfXFKDfua5FyrmKV3S
         oJOaP1qAyd/2BJd7ENx31idYLBCL8Sc+8lWzQD8KeWBWoC4qWp5VfzaX+V0iA7f70yN1
         iMYRAyE8TLHTrM9nbJBpbUr7lyCwjeZ33Alb92id4R7B1N3Jp6euoU8lwxTY1DpQ1epZ
         sigQ==
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:user-agent:in-reply-to
         :content-disposition:mime-version:references:mail-followup-to
         :message-id:subject:cc:to:from:date:arc-authentication-results
         :arc-message-signature:dkim-signature:arc-authentication-results;
        bh=MHm3GFN+3JrN9wj6IxVUH0IgNwhkRoXmykJudvRiT5E=;
        b=uKjRoF6OhyupJyggUxUxprQ+UUZ3uYHvAZfuC7zAQ/k0w69pfNukpYTrGiVJx9XZzr
         yBr+bp+AY1r0of+vicEtC1q5/aUDdDM/6MEgsg1CdABP/KXWN/JRj9AOZW6qInSRPs1A
         fb25VaAEjJkgWKlD24LWzWP7kcu30B+6+nZXdIcC1TvnxHPT8Hlbui6/VzKQRfoyyG6h
         EZZBJ3lV8znJwX9Bs7k15fuq5fgxj+UhraILDBH3sydvB7In7fOO8QXRQ1FiGcP3IC3r
         NFTHkxbgi37Yyi2hINF0/EHupBrU2hf0FFHWO7a2aGllZL/nUwj3ZfWxwLYDK3TrV 
ARC-Authentication-Results: i=2; mx.google.com;
       spf=pass (google.com: domain of magfr@lysator.liu.se designates 2001:6b0:17:f0a0::3 as permitted sender) smtp.mailfrom=magfr@lysator.liu.se
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to:cc:subject:message-id:mail-followup-to:references
         :mime-version:content-disposition:in-reply-to:user-agent
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=MHm3GFN+3JrN9wj6IxVUH0IgNwhkRoXmykJudvRiT5E=;
        b=uNhf72zePYkooETPZVEW6B54mzADw/89vBnvg89zn+pJfwTVGzCTSHsDjsoe8nXP3Z
         4VGtAVv0hPFB+4B7EXKtUxi8cfIr3qJsjFlA7/pLNHyEczBWTjjnI2OLvwhKSRfGfWg+
         ojY+9c22iMviy8SM9XPo6jrz4sVHzrnCr4m1cajjGYfyrNbCGDYdjOKoSlNQA0+PDFKT
         +7cFEyesbqXFiHzRnVkQ+Zp2FmmRZRmX2hxCDREpNseXU/YV3mD96pdGMr3uYUwH4Uvv
         a9veABZbU69sMPrwU9CCVbef4eevUK2gEm1eK7kjzY+o/PFVY2jBE//FSsOEqq2J8XQO
         lrpQ== 
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:date:from:to:cc:subject:message-id
         :mail-followup-to:references:mime-version:content-disposition
         :in-reply-to:user-agent: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=MHm3GFN+3JrN9wj6IxVUH0IgNwhkRoXmykJudvRiT5E=;
        b=I+MNi2Omu8btC5O5uVzLgEyEyLha5DNqq6uLEzicqf22Q4ucnHOWKafPyTIBMm5Pw1
         4zCMMA5FBnlvZ8Em3Zb7gwGnbBigMvyB6Kp8MsgKj3Ek8Xbbgwg3QBr6AqVedo/1SWuN
         oxSsn4ieGhwKIRS+z9sPN0vPzXJT89Zou5fmWlmHbD2T95Qmh47TIyz9BLiouQrYGQ6r
         pOlcdunTbufh8WJ4DkC2khRa6HMO/S/HDi+MZZX0c8mpd1esUW8MLccG40/CMMpa+jr5
         9aNc1CCjRKKb7v79929amhMxZ/p7yru3VnbrdLPThHjwIw 
X-Gm-Message-State: AMCzsaVsmJ6RBtSDsgF1WDJqRsHfXs/5cysJpZOZA3tMWovrbe1nlX5e
	/HDtkrnqMbIVTn055JhT8UtXTw==
X-Google-Smtp-Source: ABhQp+QwnhkSQeWpyOPkPu3bfimHEAOisNhbYoojeDpc04Z+c5hNqsmbrXaxfWB0f/v+zsm8/EffJw==
X-Received: by 10.25.18.193 with SMTP id 62mr140645lfs.4.1507997353232;
        Sat, 14 Oct 2017 09:09:13 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.46.17.77 with SMTP id f74ls594040lje.8.gmail; Sat, 14 Oct 2017
 09:09:10 -0700 (PDT)
X-Received: by 10.46.87.67 with SMTP id r3mr2008097ljd.65.1507997350890;
        Sat, 14 Oct 2017 09:09:10 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1507997350; cv=none;
        d=google.com; s=arc-20160816;
        b=yq3+GtvJAyz+OYlQC+tKud1hloJtXxsZ/zhzoA5NhlvotVpvL2F+2sOfeEOTUGFmRk
         83EC0EKu++VxobZJScXyK1WmoOrsFbNTQOfl8W/o8J0N9oR/ZYeusuvMW+vEn3qeyn/s
         tWoIk8bEzfGtfUFtjsUTnSx7YR2H7XweTMWAT7SXSyqvxnnjRqLNyW1d/ovwtUY98c2A
         gfAm5UtyoKlcExvADIb9ZfCRC8QTMbCkyqdArsL2JYI5cQK1iTkGv5xMwd0naYo7wtcq
         OpMM1OXxEUc43Uq4DyvBiUW9IuoX2wc9jT0NRcjTnJiFQSCWasbhvibohh4VC96cLM7i
         0EBg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=user-agent:in-reply-to:content-disposition:mime-version:references
         :mail-followup-to:message-id:subject:cc:to:from:date
         :arc-authentication-results;
        bh=ILE0zPSfH4py2HO66UWnKsBEmw4d+H6MJmHaw5I9tk8=;
        b=P51OnF63wyWo8RNTNIMlJ3eFBC/aBz+V6O5JZRPMkp+KtIUssEJgpZfgoUatbGUW7Y
         GzxCapqSmZ1ivzBp42E7I0ZbZj58FkDqK6kBmWQsisVn44XjNFgrsI931bYJYewAzGXs
         3sTKn9kNohiC/UO4cq0Oc/iUWGeWR59gSEsKEOhp7GuueIB1AZ5WbjZkSBlaMHpk8NM5
         hepcsqOc4mYnk43zDu9mRPz5sHEcmMESBYt/jscxAKiFGwwRqsLgFRgWw8gRCc/MU17n
         1U1ryrJkW9FLy0sGO2gbjPQ1rzuO5Mc/dQl3kDWq0U42o8vKnlkQOKxeXxlG0nGmuIas
         U02g==
ARC-Authentication-Results: i=1; mx.google.com;
       spf=pass (google.com: domain of magfr@lysator.liu.se designates 2001:6b0:17:f0a0::3 as permitted sender) smtp.mailfrom=magfr@lysator.liu.se
Original-Received: from mail.lysator.liu.se (mail.lysator.liu.se. [2001:6b0:17:f0a0::3])
        by mx.google.com with ESMTPS id h28si1078691lfb.350.2017.10.14.09.09.10
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Sat, 14 Oct 2017 09:09:10 -0700 (PDT)
Received-SPF: pass (google.com: domain of magfr@lysator.liu.se designates 2001:6b0:17:f0a0::3 as permitted sender) client-ip=2001:6b0:17:f0a0::3;
Original-Received: from mail.lysator.liu.se (localhost [127.0.0.1])
	by mail.lysator.liu.se (Postfix) with ESMTP id 56AF04001F;
	Sat, 14 Oct 2017 18:09:10 +0200 (CEST)
Original-Received: from fukushima.lysator.liu.se (fukushima.lysator.liu.se [IPv6:2001:6b0:17:f0a0::5d])
	by mail.lysator.liu.se (Postfix) with SMTP id 2D28340014;
	Sat, 14 Oct 2017 18:09:09 +0200 (CEST)
Original-Received: by fukushima.lysator.liu.se (sSMTP sendmail emulation); Sat, 14 Oct 2017 18:09:09 +0200
Mail-Followup-To: std-proposals@isocpp.org, euloanty@live.com
Content-Disposition: inline
In-Reply-To: <02fc9853-e388-4eb3-8db3-de4e0a689056@isocpp.org>
X-Virus-Scanned: ClamAV using ClamSMTP
X-Original-Sender: magfr@lysator.liu.se
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of magfr@lysator.liu.se designates 2001:6b0:17:f0a0::3 as permitted
 sender) smtp.mailfrom=magfr@lysator.liu.se
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:34915
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/34915>

On Sat, Oct 14, 2017 at 08:44:42AM -0700, euloanty@live.com wrote:
> For example. I want to test whether I reserve the exactly correct capacity 
> for vector.
> 
> 
> vector<int> v;
> v.reserve(100000);
> //emplace_back for 100001 times. I cant find mistakes.
> 
> 
> vector<int> v;
> v.reserve(100000);
> //non check emplace_back for 100001 times
> This program will collapse. And I can know I've made mistake here.

No, that program have undefined behaviour so you do not know what will happen.

/MF

-- 
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/20171014160909.GB1546%40fukushima.lysator.liu.se.

.
