220 4868 <CAGsORuCy2vonmjfha3XaUge4OKCW_EtheZqspMRfG0cne6uc7A@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Zhihao Yuan <lichray@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Proposal: std::sequence
Date: Tue, 4 Jun 2013 20:17:06 -0400
Lines: 30
Approved: news@gmane.org
Message-ID: <CAGsORuCy2vonmjfha3XaUge4OKCW_EtheZqspMRfG0cne6uc7A@mail.gmail.com>
References: <4551abbc-43aa-4520-a91a-f8eb25a90588@isocpp.org>
	<e915df62-4930-48ee-a8ac-64261c407234@isocpp.org>
	<2c8e6079-9c87-425a-93e2-39251df57cd8@isocpp.org>
	<CANh-dX=va9uLSbvQc_TRmf8o5TDzQutmkxJDc64g7b=yKyN7sg@mail.gmail.com>
	<9f1cace3-0503-4a3c-a8ce-d7546564b3ef@isocpp.org>
	<a6f024b6-45d6-4c3b-b8a6-3f056aeab51f@isocpp.org>
	<c029551c-241c-4809-adaa-7908434ba10d@isocpp.org>
	<ed3c548d-b470-47ec-850e-95d3c11e29a8@isocpp.org>
	<1c991e6e-6bc3-4822-9ffd-7f2508e63974@isocpp.org>
	<CADfx-VTw0ArZ3+JbD=Vv+o9ncwNp9miYy5RD9XXeOFGEE3N0MQ@mail.gmail.com>
	<etPan.51ae6e0b.238e1f29.8d5@server-2.private>
	<CANh-dX=zKENwN_sS84HHOuzeug0NqDiJ0w4D8FtEWFYYhMbfAg@mail.gmail.com>
	<CAGsORuBjtg1GO4ink+yS6Gy6ZsmBr2EO3Ax46uOMVRKTZat=pQ@mail.gmail.com>
	<CANh-dXm9u+Sd_k+Ld19PpYBzTo-VM_Ur32wxKxk3DJcCiUKdng@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
X-Trace: ger.gmane.org 1370391429 17691 80.91.229.3 (5 Jun 2013 00:17:09 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 5 Jun 2013 00:17:09 +0000 (UTC)
To: "std-proposals@isocpp.org" <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCUILMGRQMARBBEHXKGQKGQE3UT4XUQ@isocpp.org Wed Jun 05 02:17:10 2013
Return-path: <std-proposals+bncBCUILMGRQMARBBEHXKGQKGQE3UT4XUQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ee0-f72.google.com ([74.125.83.72])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCUILMGRQMARBBEHXKGQKGQE3UT4XUQ@isocpp.org>)
	id 1Uk1PZ-0007vs-LS
	for gclcip-std-proposals@m.gmane.org; Wed, 05 Jun 2013 02:17:09 +0200
Original-Received: by mail-ee0-f72.google.com with SMTP id b15sf70788eek.11
        for <gclcip-std-proposals@m.gmane.org>; Tue, 04 Jun 2013 17:17:09 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=x-beenthere:mime-version:in-reply-to:references:date:message-id
         :subject:from: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=zQSIMDXAm3hVfhA5JTDuR0A3s/cREf0rOBPKod7bEAM=;
        b=LRRFeoH5iMJTNg2+LmlUusppFln9QG4WN6w89EjvdeHnMXKvDaeO3ZF9jauO3WwN5/
         s1Lm43ukLmaWn/nDwvWLb/NX5agptdwJeMuJwZmYI5Gtxy4aoEwHCWCHCCGV5f+edRyy
         b8Pucf2Z+4dDuZtvayxwA86k4BSzLt1+Cn3MQK331Npv5lyf/qe2q8E+u3lLIop9OUQ2
         L1hPEKdXNSYUfXymiCCaz5tW/IHl9k4XPh5hEOBldELkQCLvJdaPOJ6zjF+jU7dTtaDE
         pB1+CCzoki+5sOIfunF9cAECZV0VBcET+UVNK4/Qctlp4lkR0D51wBb3J2rjv2JS/F8F
         IEwA==
X-Received: by 10.112.161.6 with SMTP id xo6mr2211278lbb.11.1370391429080;
        Tue, 04 Jun 2013 17:17:09 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.152.18.134 with SMTP id w6ls33299lad.45.gmail; Tue, 04 Jun
 2013 17:17:07 -0700 (PDT)
X-Received: by 10.112.218.39 with SMTP id pd7mr13912127lbc.13.1370391427846;
        Tue, 04 Jun 2013 17:17:07 -0700 (PDT)
Original-Received: from mail-la0-x22a.google.com (mail-la0-x22a.google.com [2a00:1450:4010:c03::22a])
        by mx.google.com with ESMTPS id wc8si18739496lbb.67.2013.06.04.17.17.06
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Tue, 04 Jun 2013 17:17:06 -0700 (PDT)
Received-SPF: pass (google.com: domain of lichray@gmail.com designates 2a00:1450:4010:c03::22a as permitted sender) client-ip=2a00:1450:4010:c03::22a;
Original-Received: by mail-la0-f42.google.com with SMTP id eb20so863351lab.1
        for <std-proposals@isocpp.org>; Tue, 04 Jun 2013 17:17:06 -0700 (PDT)
X-Received: by 10.112.199.98 with SMTP id jj2mr14277814lbc.114.1370391426674;
 Tue, 04 Jun 2013 17:17:06 -0700 (PDT)
Original-Received: by 10.112.146.99 with HTTP; Tue, 4 Jun 2013 17:17:06 -0700 (PDT)
In-Reply-To: <CANh-dXm9u+Sd_k+Ld19PpYBzTo-VM_Ur32wxKxk3DJcCiUKdng@mail.gmail.com>
X-Original-Sender: lichray@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of lichray@gmail.com designates 2a00:1450:4010:c03::22a as permitted
 sender) smtp.mail=lichray@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?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:4868
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/4868>

On Tue, Jun 4, 2013 at 7:26 PM, Jeffrey Yasskin <jyasskin@google.com> wrote:
> const array_ref<int> carr2 = ...;
> do_stuff_with(carr2);
> use(carr2.size());
>
> the compiler _can_ assume carr.size() is the same.

In a general case, since the same memory can be referred
by another pointer or reference, optimizers just won't analysis
the data flow.  Instead, they know many thing about the control
flow.  If the above code is optimized, that means you don't
have the code to change the size; it doesn't matter you declare
it as const or not.

--
Zhihao Yuan, ID lichray
The best way to predict the future is to invent it.
___________________________________________________
4BSD -- http://4bsd.biz/

-- 

--- 
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/?hl=en.



.
