220 5150 <2567b6ad-e4c3-4b4e-b0e9-ed0b3705687c@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Nicol Bolas <jmckesson@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: constexpr data member
Date: Wed, 19 Jun 2013 18:24:01 -0700 (PDT)
Lines: 97
Approved: news@gmane.org
Message-ID: <2567b6ad-e4c3-4b4e-b0e9-ed0b3705687c@isocpp.org>
References: <CAGsORuDonz16fG51JaLgDCHptjpZAnuWM2AgNrBN_44hxUqjXA@mail.gmail.com>
 <300a19dd-8a82-4788-9802-45170480b30a@isocpp.org>
 <CAGsORuBWr7F6wpyUd1mBFDKGU7P9jKaPaq+wOYDpFL6QGH7Byw@mail.gmail.com>
 <63d90b03-5605-476d-b40b-7ebcee0d3354@isocpp.org>
 <CAGsORuD58nw+76_2_pp6GqpwGKhbVHJ40wnCZccrUXRjxB_qNQ@mail.gmail.com>
 <cf218cdb-bfda-46e7-bedb-23795ace1ae3@isocpp.org>
 <CAGsORuAMLbeFJZwrjmaMV6AF7rop==h8BJiGiBAtgxQxO7E++g@mail.gmail.com>
 <0df105c5-7019-4674-83ac-1b071964210b@isocpp.org>
 <CAGsORuCmGnrUg+hkXCWssHp5KPu1wS+GsO__DwoDi13Y1UTDfA@mail.gmail.com>
 <9a4c139d-b08f-4dab-b5a3-9ff9d3139061@isocpp.org>
 <CAGsORuDsfTaLrJh_eL7Ke3jho9=EzMsKZ944tEnyrwrCko8APQ@mail.gmail.com>
 <1ef2b6fd-21f7-4492-a778-03952dd1720d@isocpp.org>
 <CAGsORuDE7=iC38rYdtqTgj3m5-jmtKWOK__hE7tj6o6M4a9aKA@mail.gmail.com>
 <CAGsORuCU_-sD9YYLO9W76O5UuEui8+vfH1Xj4n4MRuHDU7Ujmg@mail.gmail.com>
 <9a534f6b-4d07-4aa7-a164-4f713a3dd9ac@isocpp.org>
 <CAGsORuCty57FkZ7roxgLrUL+xeBr64yCbVLYGDbsaxbWMDXgVg@mail.gmail.com>
 <e82a3bec-32e5-49c1-9250-d088112caf48@isocpp.org>
 <CAGsORuCWWUv-u1eKVc3=HQnPywNLuneCMunJ10L-kq+kQW5JcA@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_4726_23067070.1371691441158"
X-Trace: ger.gmane.org 1371691448 10193 80.91.229.3 (20 Jun 2013 01:24:08 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Thu, 20 Jun 2013 01:24:08 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCEKFTV6ZUMBBMVTRGHAKGQEITHOVTA@isocpp.org Thu Jun 20 03:24:07 2013
Return-path: <std-proposals+bncBCEKFTV6ZUMBBMVTRGHAKGQEITHOVTA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ie0-f200.google.com ([209.85.223.200])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCEKFTV6ZUMBBMVTRGHAKGQEITHOVTA@isocpp.org>)
	id 1UpTba-0007dJ-7M
	for gclcip-std-proposals@m.gmane.org; Thu, 20 Jun 2013 03:24:06 +0200
Original-Received: by mail-ie0-f200.google.com with SMTP id x12sf27631886ief.7
        for <gclcip-std-proposals@m.gmane.org>; Wed, 19 Jun 2013 18:24:04 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=x-beenthere:date:from:to:message-id:in-reply-to:references:subject
         :mime-version:x-original-sender:reply-to:precedence:mailing-list
         :list-id:x-google-group-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe:content-type;
        bh=YTkXdKMkejsPo/JctVuTas8yLLtkJiJ7BaWfMo9xFFk=;
        b=PArEDoV6A9ZJdSYUOk0BH6iTAIH4qevGQY1giMePfRN4HOOiTmshVTaCcuvCeVNuSw
         i/qQfoG124PMLS43L9wDbjriH/qY1pTF7Ycf1Psy/70Rv+ZSq2K1J3zZ8ivO0+Ra+kwb
         L0t0tn7Fg6AuvOQFDNCyHVMjiYTtI0OdLn7FiE4unn0wAJr27VsrMoQtSb8vopUA/fq3
         0+iMtIkkA315KgeY0u0z0bUS0l+Ju1wJvBMDpIxzN8tRF1Mllyxku5+Kwx7CT1jwp4z2
         4piwB6l5rnWCM6gUNc8yLfmHkyWVrgQA4ztpdLejSp+SrGRwM13cYlfNhh01YMmOTxTU
         EKrg==
X-Received: by 10.42.161.71 with SMTP id s7mr3893863icx.18.1371691444601;
        Wed, 19 Jun 2013 18:24:04 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.50.93.104 with SMTP id ct8ls80461igb.18.gmail; Wed, 19 Jun
 2013 18:24:02 -0700 (PDT)
X-Received: by 10.50.45.35 with SMTP id j3mr277737igm.3.1371691442270;
        Wed, 19 Jun 2013 18:24:02 -0700 (PDT)
In-Reply-To: <CAGsORuCWWUv-u1eKVc3=HQnPywNLuneCMunJ10L-kq+kQW5JcA@mail.gmail.com>
X-Original-Sender: jmckesson@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>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:5150
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/5150>

------=_Part_4726_23067070.1371691441158
Content-Type: text/plain; charset=ISO-8859-1

On Wednesday, June 19, 2013 5:39:20 PM UTC-7, Zhihao Yuan wrote:
>
> On Wed, Jun 19, 2013 at 8:19 PM, Nicol Bolas <jmck...@gmail.com<javascript:>> 
> wrote: 
> > The fact that the variable happens to be a constant doesn't change the 
> fact 
> > that it's still a variable. It represents an object; just an immutable 
> one. 
>
> No, that's const, not constexpr.  constexpr has the interfaces of an 
> object, like, can be taken address, but they can be regarded and 
> used as real constant.


You can think of it as whatever you like; as far as the Standard for 
Programming Language C++ is concerned, it's a variable. It looks like a 
variable. It acts like a variable. It reacts in every way like a regular 
old variable as far as C++ is concerned. It has *storage* with a particular 
size, alignment, and memory location. They can be of pointer and reference 
types. And so forth.

It is not a literal or macro or other kind of thing that just disappears 
into the aether after compilation.

Yes, there are differences, but there are differences between a mutable 
variable and a `const` variable too. Yet they're both still *variables*. 
Just like `constexpr` variables are.

We shouldn't make changes to the standard based on what someone wants to 
think of something as. We should make them based on what something is. And 
if you want to make a variable member-static, whether mutable, `const`, or 
`constexpr`, we already have syntax for that.

-- 

--- 
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/.



------=_Part_4726_23067070.1371691441158
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Wednesday, June 19, 2013 5:39:20 PM UTC-7, Zhihao Yuan wrote:<blockquote=
 class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1=
px #ccc solid;padding-left: 1ex;">On Wed, Jun 19, 2013 at 8:19 PM, Nicol Bo=
las &lt;<a href=3D"javascript:" target=3D"_blank" gdf-obfuscated-mailto=3D"=
3VTJTHT6TiwJ">jmck...@gmail.com</a>&gt; wrote:
<br>&gt; The fact that the variable happens to be a constant doesn't change=
 the fact
<br>&gt; that it's still a variable. It represents an object; just an immut=
able one.
<br>
<br>No, that's const, not constexpr. &nbsp;constexpr has the interfaces of =
an
<br>object, like, can be taken address, but they can be regarded and
<br>used as real constant.</blockquote><div><br></div>You can think of it a=
s whatever you like; as far as the Standard for Programming Language C++ is=
 concerned, it's a variable. It looks like a variable. It acts like a varia=
ble. It reacts in every=20
way like a regular old variable as far as C++ is concerned. It has <i>stora=
ge</i> with a particular size, alignment, and memory location. They can be =
of pointer and reference types. And so forth.<br><br>It is not a literal or=
 macro or other kind of thing that just disappears into the aether after co=
mpilation.<br><br>Yes, there are differences, but there are differences bet=
ween a mutable variable and a `const` variable too. Yet they're both still =
<i>variables</i>. Just like `constexpr` variables are.<br><br>We shouldn't =
make changes to the standard based on what someone wants to think of someth=
ing as. We should make them based on what something is. And if you want to =
make a variable member-static, whether mutable, `const`, or `constexpr`, we=
 already have syntax for that.<br>

<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/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />
&nbsp;<br />
&nbsp;<br />

------=_Part_4726_23067070.1371691441158--

.
