220 5139 <CAGsORuB6Jo7x0h6jaHw2fn5kj-pN25eGfo4a1u6d3YCHAcCd7Q@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: constexpr data member
Date: Wed, 19 Jun 2013 18:24:13 -0400
Lines: 36
Approved: news@gmane.org
Message-ID: <CAGsORuB6Jo7x0h6jaHw2fn5kj-pN25eGfo4a1u6d3YCHAcCd7Q@mail.gmail.com>
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>
	<CAOfiQqmucHS-9NbPKdFKRSoxfbeYMmt-EnzqEw=pN7wRv0uTfA@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 1371680736 7724 80.91.229.3 (19 Jun 2013 22:25:36 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 19 Jun 2013 22:25:36 +0000 (UTC)
To: "std-proposals@isocpp.org" <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCUILMGRQMARBYG7RCHAKGQE2JSL4PY@isocpp.org Thu Jun 20 00:25:38 2013
Return-path: <std-proposals+bncBCUILMGRQMARBYG7RCHAKGQE2JSL4PY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-we0-f198.google.com ([74.125.82.198])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCUILMGRQMARBYG7RCHAKGQE2JSL4PY@isocpp.org>)
	id 1UpQor-0002lO-Ks
	for gclcip-std-proposals@m.gmane.org; Thu, 20 Jun 2013 00:25:37 +0200
Original-Received: by mail-we0-f198.google.com with SMTP id q59sf5426094wes.9
        for <gclcip-std-proposals@m.gmane.org>; Wed, 19 Jun 2013 15:25:37 -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=EtawHolGmfvNNn11Y07CSE+brDB6Hx9Lf3UsBbr38Pc=;
        b=LueEjehxvZSsBQfiejjUZn95rHvJ0xypocjuu/XlDaWUoNmfa4zhs6i7wPkn7K4dUZ
         UtpXYWf2Sul22u+AmwPu6S3BwZJ0QIQwyRUZxs5/qN9d2ggUpXRONgxPwNZnW51JUzTq
         uO7mpx0UNV7sL96aGJIwjzT+6XQkRS/2vqRcso9fc+0kmvdvoKLkSE3CtKsn5Kq7C9Jn
         Fx+04U3N+/s4hvbHVy64PuhuKqgppFrr5BlicfTBRFhwuTgoMaa2iRpCunJm2H9dSdRP
         hnFUvgxLubUf3vAlqWSdjidrfLgFIOvNcJRJOJusSdoNKCwyLi+NRw/T/JmW62zTJtvQ
         rMpg==
X-Received: by 10.152.4.168 with SMTP id l8mr1201059lal.7.1371680736626;
        Wed, 19 Jun 2013 15:25:36 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.152.25.230 with SMTP id f6ls34171lag.10.gmail; Wed, 19 Jun
 2013 15:25:35 -0700 (PDT)
X-Received: by 10.112.16.74 with SMTP id e10mr4191678lbd.46.1371680654143;
        Wed, 19 Jun 2013 15:24:14 -0700 (PDT)
Original-Received: from mail-la0-x236.google.com (mail-la0-x236.google.com [2a00:1450:4010:c03::236])
        by mx.google.com with ESMTPS id f1si10826837lbd.153.2013.06.19.15.24.14
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Wed, 19 Jun 2013 15:24:14 -0700 (PDT)
Received-SPF: pass (google.com: domain of lichray@gmail.com designates 2a00:1450:4010:c03::236 as permitted sender) client-ip=2a00:1450:4010:c03::236;
Original-Received: by mail-la0-f54.google.com with SMTP id ec20so5145563lab.27
        for <std-proposals@isocpp.org>; Wed, 19 Jun 2013 15:24:14 -0700 (PDT)
X-Received: by 10.112.76.106 with SMTP id j10mr4160061lbw.19.1371680653961;
 Wed, 19 Jun 2013 15:24:13 -0700 (PDT)
Original-Received: by 10.112.79.161 with HTTP; Wed, 19 Jun 2013 15:24:13 -0700 (PDT)
In-Reply-To: <CAOfiQqmucHS-9NbPKdFKRSoxfbeYMmt-EnzqEw=pN7wRv0uTfA@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::236 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>, <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:5139
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/5139>

On Wed, Jun 19, 2013 at 6:08 PM, Richard Smith <richard@metafoo.co.uk> wrote:
> struct A {
>   constexpr int a = 123;
> };
> A a1, a2;
> static_assert(a1.a == 123, "");
> static_assert(&a1.a != &a2.a, "");
>
> Note that I'm not proposing the above, or even saying that it's a good
> idea, only that your proposal is not future-proof.

If we change it to

  static_assert(&a1.a == &a2.a, "");

I have a feeling it's more close to what I want -- a constant
has nothing to do with static keyword.  If the syntax object.name
can be overloaded to access a variable which is not per-
object, I think it's OK.

--
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/.



.
