220 4884 <CANh-dXmpdhmRYfXzTA18y03i_m_v-1Nesw00FiZj=1=g4g3+4g@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Jeffrey Yasskin <jyasskin@google.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Proposal: std::sequence
Date: Tue, 4 Jun 2013 22:36:21 -0700
Lines: 26
Approved: news@gmane.org
Message-ID: <CANh-dXmpdhmRYfXzTA18y03i_m_v-1Nesw00FiZj=1=g4g3+4g@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>
 <CAGsORuCy2vonmjfha3XaUge4OKCW_EtheZqspMRfG0cne6uc7A@mail.gmail.com>
 <CANh-dX=4BbGOaMPzHG2nQw3NScYCWhCGntnyyFA9iiweC2mV6w@mail.gmail.com>
 <CAGsORuANw6cgQYKSxJhKAEd8F+8_=ObHJcnE33OPLYs7dCYsUw@mail.gmail.com>
 <CAGg_6+NQ_zDUZrfcwEBKcCUXs=vtF4q6dkU527BNEKAbW0tW+Q@mail.gmail.com>
 <CAGsORuDcF35cyHfM-_bPeSaon80SOD=i7aBmvZo1-rThnVJVPg@mail.gmail.com>
 <CAFfXxVteQWys1D1ZEKjmePM7kb7kWR1SUV2fYpMEGL_Y8wGwBA@mail.gmail.com> <CAGsORuCcEtYFjO7un8OjhkfP4cn0T_=MALpF3D6cU+bBwrPV-A@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 1370410603 20301 80.91.229.3 (5 Jun 2013 05:36:43 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 5 Jun 2013 05:36:43 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDDM34EO6QDRB2U4XOGQKGQEMSR5LTA@isocpp.org Wed Jun 05 07:36:44 2013
Return-path: <std-proposals+bncBDDM34EO6QDRB2U4XOGQKGQEMSR5LTA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-yh0-f70.google.com ([209.85.213.70])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDDM34EO6QDRB2U4XOGQKGQEMSR5LTA@isocpp.org>)
	id 1Uk6Op-0001cc-PW
	for gclcip-std-proposals@m.gmane.org; Wed, 05 Jun 2013 07:36:44 +0200
Original-Received: by mail-yh0-f70.google.com with SMTP id l109sf1348723yhq.1
        for <gclcip-std-proposals@m.gmane.org>; Tue, 04 Jun 2013 22:36:43 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=google.com; s=20120113;
        h=x-beenthere:mime-version: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-google-group-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe:content-type;
        bh=QxG4mvB5H7SjnSncDzktQD50jVPfLRXeeJpdiyi8Wqs=;
        b=lMD1Km46MBb+JVnnMr2P7Kb0zhG91S2LRy4YtQiTxlRpg4zfjTkf9eBCZnoq4D32I5
         eShP4DA8WxkFmYOEXU08Fr8D1Clar59ChoGhbYgHfhA/fLfhSqQKC3iu/edgBxgAADAW
         qL1PATFawush2cga3F8M8AOJJg682zD2uppz8Eq1l9nOAa1Ub8nBrZ0/HXB48lhp+Cb7
         o1FH58mP3BQCi3HGVGlTDTL2K5/05/J/ZPJvyh3MzN9z2vJfCfsTI5DkWtrfAdE1386w
         cVLy+TThh7rGgJQU0v2sLYXG0WjodSH4WrrzhwrGDrCvsMZ2/Avgy7S4/9hcf/WsR/Rz
         n0RA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=google.com; s=20120113;
        h=x-beenthere:mime-version:in-reply-to:references:from:date
         :message-id:subject:to:x-gm-message-state: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=QxG4mvB5H7SjnSncDzktQD50jVPfLRXeeJpdiyi8Wqs=;
        b=L3NSd5eH87mVXQ3sD5nnkKJTAiNm9kzXqa+quOqVqCGs3TNZmELWTXFhIxITkynygv
         ypk7IIn97023QbOD8riZx35SVES+lTuBGF5AK4PwxQMSHQturYNyuu5hEHiCBJP658YX
         +Hbem8Dm03RPBKqf8BWHGdSwE1pPGcK7pvi4ZipL74M5v/GyQgfHhgqdVCy9ZnMpDe3W
         sa3SecmwmFYKissp+NncSDOxsKcdEddvDOOf6IVGROgLngyo8sSNDmOsnAOtcTsXVPPr
         rnoNn6Qo2fw74oqoBdT8zc1hoCtUcikpdw9MupC1pPc/2bbpXLh/yyiYP/9oudbaiaeE
         1yDg==
X-Received: by 10.224.215.68 with SMTP id hd4mr4108802qab.5.1370410602865;
        Tue, 04 Jun 2013 22:36:42 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.49.129.198 with SMTP id ny6ls680974qeb.75.gmail; Tue, 04 Jun
 2013 22:36:41 -0700 (PDT)
X-Received: by 10.224.205.202 with SMTP id fr10mr26559849qab.48.1370410601489;
        Tue, 04 Jun 2013 22:36:41 -0700 (PDT)
Original-Received: from mail-qa0-x22b.google.com (mail-qa0-x22b.google.com [2607:f8b0:400d:c00::22b])
        by mx.google.com with ESMTPS id p10si6206717qcq.34.2013.06.04.22.36.41
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Tue, 04 Jun 2013 22:36:41 -0700 (PDT)
Received-SPF: pass (google.com: domain of jyasskin@google.com designates 2607:f8b0:400d:c00::22b as permitted sender) client-ip=2607:f8b0:400d:c00::22b;
Original-Received: by mail-qa0-f43.google.com with SMTP id d13so275765qak.2
        for <std-proposals@isocpp.org>; Tue, 04 Jun 2013 22:36:41 -0700 (PDT)
X-Received: by 10.224.79.138 with SMTP id p10mr26574473qak.13.1370410601300;
 Tue, 04 Jun 2013 22:36:41 -0700 (PDT)
Original-Received: by 10.229.78.22 with HTTP; Tue, 4 Jun 2013 22:36:21 -0700 (PDT)
In-Reply-To: <CAGsORuCcEtYFjO7un8OjhkfP4cn0T_=MALpF3D6cU+bBwrPV-A@mail.gmail.com>
X-Gm-Message-State: ALoCoQlyzqm5DhsmJKzWfh5zzwZD4MtMtdno6SEoS0WKgHFLcLFJ5WO2fCF9MvTan21QImngQA2paiujaSXuyXgULvWw9rf3JftuZA5AjafUWCvAiImuTwCU/m123nVSfmb9COwgy/3sJqH0STVY9NvUK9nHGOPhPIE0oKp3a4h/R1tesgjdJ9KtnNSs3qVVL7OCdIHhIOXF
X-Original-Sender: jyasskin@google.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of jyasskin@google.com designates 2607:f8b0:400d:c00::22b as permitted
 sender) smtp.mail=jyasskin@google.com;       dkim=pass header.i=@google.com;
       dmarc=pass (p=REJECT dis=none) d=google.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:4884
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/4884>

On Tue, Jun 4, 2013 at 10:16 PM, Zhihao Yuan <lichray@gmail.com> wrote:
> On Wed, Jun 5, 2013 at 12:07 AM, James Dennett <jdennett@google.com> wrote:
>> If you declare 'a' as const then compilers can print 10 whatever you
>> type in, because they optimize away the read in a.x, because they are
>> allowed to.
>
> Try it before you saying this.

James is saying what compilers are allowed to do. You've observed that
gcc and clang do not yet actually do it. Your observation doesn't mean
they aren't allowed to do it, and if you care at all about the people
who'll be maintaining your code in the future, you shouldn't code as
if they won't do it in the future.

Jeffrey

-- 

--- 
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.



.
