220 32833 <1dea3831-d801-43ab-9888-40b8364c3f7e@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Halfdan Ingvarsson <halfdan@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: std::enum
Date: Wed, 21 Jun 2017 05:34:29 -0700 (PDT)
Lines: 101
Approved: news@gmane.org
Message-ID: <1dea3831-d801-43ab-9888-40b8364c3f7e@isocpp.org>
References: <1cdd0fbf-c65d-4034-82d1-a84d4c4f6d1c@isocpp.org>
 <2426352.kqhfR8YEAN@tjmaciei-mobl1>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_4702_2035059246.1498048469754"
X-Trace: blaine.gmane.org 1498048472 1212 195.159.176.226 (21 Jun 2017 12:34:32 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Wed, 21 Jun 2017 12:34:32 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBD5MZ4NLUIMRBVWPVHFAKGQEZ2EXLIA@isocpp.org Wed Jun 21 14:34:28 2017
Return-path: <std-proposals+bncBD5MZ4NLUIMRBVWPVHFAKGQEZ2EXLIA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-io0-f200.google.com ([209.85.223.200])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBD5MZ4NLUIMRBVWPVHFAKGQEZ2EXLIA@isocpp.org>)
	id 1dNeq3-0008Pw-Kv
	for gclcip-std-proposals@m.gmane.org; Wed, 21 Jun 2017 14:34:27 +0200
Original-Received: by mail-io0-f200.google.com with SMTP id k93sf2503296ioi.1
        for <gclcip-std-proposals@m.gmane.org>; Wed, 21 Jun 2017 05:34:31 -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
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=BeeODbqLPZ3Tn9/cCBvAKKOQrrHMjxB4cteAfCgvemQ=;
        b=l5JJ17UZmabGcNrS8lHtq7lg0Nea3FmvXA6LljFJbe6YhJ7tIc1dl1O19kvxNLwIhX
         DWibnovX8fnld9GT6c5xo/dNVzfzJZB6Intq/OJmp5ickSVqGtisl+tyyWouEpDd7WkJ
         ANgP9+KFgaQtfmnXWXUbyNj+a4/ZGlZrbPaJe9qIskuyArHXR0n0XbN0bSu9LfdSnr82
         yX46O8xteWdSa/SvqEWtKYKyjZdhrodqxYa1CKqK+CBrghucMFNJOT58omCn7YqMnIGa
         ZXygS3drnoNPPzMtGkwRHOdOgRjpblpzRc7jbrXOaOqwWd6YME+6k79wnB/9ob3H+9BA
         yijg==
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
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=BeeODbqLPZ3Tn9/cCBvAKKOQrrHMjxB4cteAfCgvemQ=;
        b=I4wIZisiHmQty/fcQ8KZW8lEC0iPloP5xBVOXmBe3LngUIqBqxeZiAWLIPySmDDKqK
         /s3SrlVaMJNWmbHwQaGc4E/aHUfr5iaXxxyS8QYdxqHsMqHTJxvLrc0zEmB5O3nF9mKw
         WQKOH+m/3QQocwzyRRLJkAYfXOjGTca4Mcl57U81pCTLg2M9WXZsbsSP9vBBejGJiL+u
         b5wuq2oVpRSgU4SS7XdWiy7hMDDm+ZVgrn8HYoTTDiCsCcgMf/KFcNqVkHK7sJ23kid4
         H0pWOPRjiePRoaOqeHlZlSi2nyFH3V8KuVe/6rrRcSI0oL8V8EwfPeiuHhbumghScVMV
         Bqug==
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=BeeODbqLPZ3Tn9/cCBvAKKOQrrHMjxB4cteAfCgvemQ=;
        b=eFMoBYDhiGswgY9IW27S1dD+0ce2CPD2VmvfRnoG9tdTz0UVi5DcfHEK45pYCDdkAL
         Ydx43RMq23PMQmWAYII7jwYV188qyBotDeMioRQXv6Hc3voMUKkzApq2Zg9sHzdIyrM0
         2/IM8cpVJM+0PoF8Stfbw3LqzdZfM2u+fWqnN1/2pmoFcBVKoFEbhLuH+YSNCWS9rnUZ
         Px1IQDD83EVAPyPH8cci06N/kAddME6Z4Br07NqodExJQ9xejo+9/4kWM4aELI/uv6ow
         d+qAPSvGty3B3h0InaGxCqzzYPGuBOcpkIxVCEcUy60d2ycQVlktnOGLx2WFzfddj+ps
         1UvA==
X-Gm-Message-State: AKS2vOwYXF1ghjYFcPqW87mHQL07ueFz5oBU9uamuIZmen8AovvaPiw0
	37AFyuDfH+UF4YeD
X-Received: by 10.36.40.13 with SMTP id h13mr4491781ith.39.1498048470962;
        Wed, 21 Jun 2017 05:34:30 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.43.178 with SMTP id u47ls3890781ota.16.gmail; Wed, 21 Jun
 2017 05:34:30 -0700 (PDT)
X-Received: by 10.157.46.132 with SMTP id w4mr679604ota.18.1498048470233;
        Wed, 21 Jun 2017 05:34:30 -0700 (PDT)
In-Reply-To: <2426352.kqhfR8YEAN@tjmaciei-mobl1>
X-Original-Sender: halfdan@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:32833
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/32833>

------=_Part_4702_2035059246.1498048469754
Content-Type: multipart/alternative; 
	boundary="----=_Part_4703_1517395180.1498048469754"

------=_Part_4703_1517395180.1498048469754
Content-Type: text/plain; charset="UTF-8"

On Wednesday, June 21, 2017 at 12:06:54 AM UTC-4, Thiago Macieira wrote:
>
> On Tuesday, 20 June 2017 20:34:28 PDT Halfdan Ingvarsson wrote: 
> > I'd like to propose a simple, but very useful utility class for the 
> > standard library: std::enum. 
>
> You need to find a different name. We can't have a class whose name is a 
> reserved keyword. 
>

Er. Yes. std::enum_array. It got lost in the wash.
 

> You're asking for enum reflection. There are many proposals about that, 
> both 
> restricted to enums as well as generic (reflection for everything). The 
> restricted proposals haven't gained much traction, so everything now 
> depends 
> on the full reflection proposals being accepted. 
>

Indeed. 

So far, the only proposal I've seen where I can easily enumerate an enum in 
a for-each, is the one from Sutton and Sutter (P0590R0). The rest are a 
form of a <foo>::get<I>() template, where, if the proposal doesn't include 
it, one would be forced to write some variadic template magic to cover that 
aspect.

However, the front-runner reflection proposals all rely on the existence of 
concepts in the standard, which makes me think that we're nowhere near 
anything resembling reflection for a long time indeed.

-- 
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/1dea3831-d801-43ab-9888-40b8364c3f7e%40isocpp.org.

------=_Part_4703_1517395180.1498048469754
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Wednesday, June 21, 2017 at 12:06:54 AM UTC-4, Thiago M=
acieira wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-l=
eft: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">On Tuesday, 20 J=
une 2017 20:34:28 PDT Halfdan Ingvarsson wrote:
<br>&gt; I&#39;d like to propose a simple, but very useful utility class fo=
r the
<br>&gt; standard library: std::enum.
<br>
<br>You need to find a different name. We can&#39;t have a class whose name=
 is a=20
<br>reserved keyword.
<br></blockquote><div><br></div><div>Er. Yes. std::enum_array. It got lost =
in the wash.</div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=
=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: =
1ex;">You&#39;re asking for enum reflection. There are many proposals about=
 that, both=20
<br>restricted to enums as well as generic (reflection for everything). The=
=20
<br>restricted proposals haven&#39;t gained much traction, so everything no=
w depends=20
<br>on the full reflection proposals being accepted.
<br></blockquote><div><br></div><div>Indeed.=C2=A0</div><div><br></div><div=
>So far, the only proposal I&#39;ve seen where I can easily enumerate an en=
um in a for-each, is the one from Sutton and Sutter (P0590R0). The rest are=
 a form of a &lt;foo&gt;::get&lt;I&gt;() template, where, if the proposal d=
oesn&#39;t include it, one would be forced to write some variadic template =
magic to cover that aspect.</div><div><br></div><div>However, the front-run=
ner reflection proposals all rely on the existence of concepts in the stand=
ard, which makes me think that we&#39;re nowhere near anything resembling r=
eflection for a long time indeed.</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/1dea3831-d801-43ab-9888-40b8364c3f7e%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/1dea3831-d801-43ab-9888-40b8364c3f7e=
%40isocpp.org</a>.<br />

------=_Part_4703_1517395180.1498048469754--

------=_Part_4702_2035059246.1498048469754--

.
