220 32241 <285f811f-044a-4121-a107-c463bd0693e1@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Jakob Riedle <jakob.riedle@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Allow constexpr static data members in a literal type.
Date: Sat, 29 Apr 2017 14:51:52 -0700 (PDT)
Lines: 93
Approved: news@gmane.org
Message-ID: <285f811f-044a-4121-a107-c463bd0693e1@isocpp.org>
References: <dfb9f65c-ea1d-e92b-85e0-333efed1aec5@scylladb.com>
 <61acd2a4-d2f8-41ef-849a-0c47cee485d1@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_1560_1303958533.1493502712158"
X-Trace: blaine.gmane.org 1493502718 25770 195.159.176.226 (29 Apr 2017 21:51:58 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Sat, 29 Apr 2017 21:51:58 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCX2XNFO6MPRB6EVSTEAKGQEYD7QMNI@isocpp.org Sat Apr 29 23:51:53 2017
Return-path: <std-proposals+bncBCX2XNFO6MPRB6EVSTEAKGQEYD7QMNI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-pf0-f198.google.com ([209.85.192.198])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCX2XNFO6MPRB6EVSTEAKGQEYD7QMNI@isocpp.org>)
	id 1d4aHR-0006Wn-JI
	for gclcip-std-proposals@m.gmane.org; Sat, 29 Apr 2017 23:51:53 +0200
Original-Received: by mail-pf0-f198.google.com with SMTP id j16sf58065678pfk.4
        for <gclcip-std-proposals@m.gmane.org>; Sat, 29 Apr 2017 14:51:54 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=jSJ3BqC4tH0Cay3XRDmrG4LsW5UW//OBfiiIyie0bF4=;
        b=VPuPI7PVA8Ohl6jyWGUj1bdimD4TRynKZM0eQfSyJlwUQg7MlE01gYMZqDxXlHdWBF
         +JpNOcrzuy1zv4SoijUpLLh3at3oZNRskBl1Y8xwvud40Gglc6aqY3YfFfYolTRCOIHm
         H5Hincn6tl9Drx0jXtcORa4TZxTMarjxMXP20/wgI5OgePSV8B29ZGMwJZJ5shluNzUI
         K3m638i6IgAHOQ5+mbzauJrMXcU4zMKd7gsFhLlSqQeIe5PtmqO3DiGFVKTzxLVp6Ogf
         mhkogvnLKibfxjfnyr4xqTn2hmKxFr5rzYxJ6ZHB+dNuZ2aVgWp4fvY9PkUIA3i1iJcR
         LM5A==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=jSJ3BqC4tH0Cay3XRDmrG4LsW5UW//OBfiiIyie0bF4=;
        b=lqv2Z/FnU8Q//B7KfIePNF+mLofhBRUk3e3TuuxaUI6i4wcjpMrQMxg+TDcexPtmGd
         eN0RwG4f2ajiJ1c9/5FQ6W3TK8PVKq3AJnhcfOjzvAzjwK51kMz+NbNyNI+GHay3lCQg
         zXTqnvOMtNddqLmK6kiOGyD9sJ00akF8yB/3pBGYSaVcorKbVe1XOw8/YYAfnqkBlgCj
         fhBEDgXGXYIQ3W8/FYZJ2aqaLzw2dUYOE+z8U5kp4gE3bBhJzrC6WnsHumQ5pWvKtJAY
         5PrnDz5x9npxBOOeuahNRso97Zk0uPpv4wUvax6xF+GUId6WNMregRO0Xgtb0iFUUWBY
         mQtQ==
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:message-id:in-reply-to:references
         :subject:mime-version:x-original-sender:reply-to:precedence
         :mailing-list:list-id:x-spam-checked-in-group:list-post:list-help
         :list-archive:list-subscribe:list-unsubscribe;
        bh=jSJ3BqC4tH0Cay3XRDmrG4LsW5UW//OBfiiIyie0bF4=;
        b=GpehRLEH1RTqa2qjnzfyqOFTQ5U3ZBXHEVd3QdNhxYw1WHDgRAqypCJslrhmtHLJWm
         LsmbMkM/ix8m4kBWS+9Y5/poSKD9YTnExbVSlcVAkrbhM95Sw1djFDZKRQlclvGWcqSo
         1fxUaGaNjgQu+YQg/dPqmnoKlfIQFnB84u9OzE+p17kDJ5FwsJeOtndhIEaD4Z9TBNhk
         kTMVsKAcKYNhKsDDwglp3QiDukyifdfqS7D8+6iPDBuCUneYojuTntMW50BFgtVX4HZN
         +O9byZsaOEeg1b35Th4FMNER3OYa5HVAVeLT4DlouXEd3Nb5yg44H9LHhTMpmRL3apC9
         Ua9w==
X-Gm-Message-State: AN3rC/60aFy3pQwa96ZYzCVujHTX9iM8VkYuAk6HOJ3Q9p5N9JqLeD2a
	qALFBbbCaz++8Q==
X-Received: by 10.99.157.75 with SMTP id i72mr8544432pgd.78.1493502713771;
        Sat, 29 Apr 2017 14:51:53 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.56.90 with SMTP id r26ls8196285otd.0.gmail; Sat, 29 Apr
 2017 14:51:52 -0700 (PDT)
X-Received: by 10.157.60.148 with SMTP id z20mr356565otc.3.1493502712708;
        Sat, 29 Apr 2017 14:51:52 -0700 (PDT)
In-Reply-To: <61acd2a4-d2f8-41ef-849a-0c47cee485d1@isocpp.org>
X-Original-Sender: jakob.riedle@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: <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:32241
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/32241>

------=_Part_1560_1303958533.1493502712158
Content-Type: multipart/alternative; 
	boundary="----=_Part_1561_1319635756.1493502712159"

------=_Part_1561_1319635756.1493502712159
Content-Type: text/plain; charset=UTF-8

Am Mittwoch, 19. April 2017 18:45:15 UTC+2 schrieb HarD Gamer:
>
>
> https://groups.google.com/a/isocpp.org/forum/#!topic/std-proposals/pSHhUp0-7so
>

This basically represents *a work-around* but I hardly consider
inline variable definitions outside of the class in which they are declared 
as intuitive.


To my knowledge, there are only *historical reasons* that
static variables of a class should not be defined inside
that class but instead declared inside and defined
outside of the class and in only one source file.

In order to fish or cut bait w.r.t. a proposal, I'd be interested in three 
things:
1. Are there any reasons against allowing the definition of *constexpr 
static class members *of the containing class type within this class itself?
2. Are there any reasons against allowing the definition of *(non-constexpr) 
static class* *members *of the containing class type within this class as 
well?
3. From question 1 and 2 stems the question: Can we just allow *static 
class members* to be defined inside the class itself, *as if they'd been 
defined outside of the class as inline variable*?

Am I mistaken at some point?

-- 
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/285f811f-044a-4121-a107-c463bd0693e1%40isocpp.org.

------=_Part_1561_1319635756.1493502712159
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Am Mittwoch, 19. April 2017 18:45:15 UTC+2 schrieb HarD Ga=
mer:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex=
;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr"><a href=
=3D"https://groups.google.com/a/isocpp.org/forum/#!topic/std-proposals/pSHh=
Up0-7so" target=3D"_blank" rel=3D"nofollow" onmousedown=3D"this.href=3D&#39=
;https://groups.google.com/a/isocpp.org/forum/#!topic/std-proposals/pSHhUp0=
-7so&#39;;return true;" onclick=3D"this.href=3D&#39;https://groups.google.c=
om/a/isocpp.org/forum/#!topic/std-proposals/pSHhUp0-7so&#39;;return true;">=
https://groups.google.com/a/<wbr>isocpp.org/forum/#!topic/std-<wbr>proposal=
s/pSHhUp0-7so</a></div></blockquote><div><br></div><div>This basically repr=
esents <b>a work-around</b> but I hardly consider</div><div>inline variable=
 definitions outside of the class in which they are declared as intuitive.<=
/div><div><br></div><div><br></div><div>To my knowledge, there are only <i>=
historical reasons</i> that</div><div>static variables of a class should no=
t be defined inside</div><div>that class but instead declared inside and de=
fined</div><div>outside of the class and in only one source file.</div><div=
><br></div><div>In order to fish or cut bait w.r.t. a proposal, I&#39;d be =
interested in three things:</div><div>1. Are there any reasons against allo=
wing the definition of <b>constexpr static class members </b>of the contain=
ing class type within this class itself?</div><div>2. Are there any reasons=
 against allowing the definition of <b>(non-constexpr) static class</b> <b>=
members </b>of the containing class type=C2=A0within this class as well?</d=
iv><div>3. From question 1 and 2 stems the question: Can we just allow <b>s=
tatic class members</b> to be defined inside the class itself, <b>as if the=
y&#39;d been defined outside of the class as inline variable</b>?</div><div=
><br></div><div>Am I mistaken at some point?</div><div><br></div></div>

<p></p>

-- <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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/285f811f-044a-4121-a107-c463bd0693e1%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/285f811f-044a-4121-a107-c463bd0693e1=
%40isocpp.org</a>.<br />

------=_Part_1561_1319635756.1493502712159--

------=_Part_1560_1303958533.1493502712158--

.
