220 32820 <2426352.kqhfR8YEAN@tjmaciei-mobl1> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Thiago Macieira <thiago@macieira.org>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: std::enum
Date: Tue, 20 Jun 2017 21:06:49 -0700
Lines: 28
Approved: news@gmane.org
Message-ID: <2426352.kqhfR8YEAN@tjmaciei-mobl1>
References: <1cdd0fbf-c65d-4034-82d1-a84d4c4f6d1c@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: blaine.gmane.org 1498018016 6538 195.159.176.226 (21 Jun 2017 04:06:56 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Wed, 21 Jun 2017 04:06:56 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCB4TK757YBRBXHBU7FAKGQEVGAN3NI@isocpp.org Wed Jun 21 06:06:50 2017
Return-path: <std-proposals+bncBCB4TK757YBRBXHBU7FAKGQEVGAN3NI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-yb0-f198.google.com ([209.85.213.198])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCB4TK757YBRBXHBU7FAKGQEVGAN3NI@isocpp.org>)
	id 1dNWum-0001KX-Gc
	for gclcip-std-proposals@m.gmane.org; Wed, 21 Jun 2017 06:06:48 +0200
Original-Received: by mail-yb0-f198.google.com with SMTP id d4sf48999412ybe.14
        for <gclcip-std-proposals@m.gmane.org>; Tue, 20 Jun 2017 21:06:54 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1498018013; cv=pass;
        d=google.com; s=arc-20160816;
        b=ptFPHqGdEeow/LnyOEUUyWZ8ZVYypuIdBJhlO/AdgfPRmOeYnaVInN4R9UhdqSD/+5
         WkdfsdvpOUAy1e5zs5kfD9J/6E0uNi5OVaoN6HxQ6v2/O/06WcovfMCLvF/fVXuSwoa4
         h9Tr9AUmF3zPaZAZqGpkBaWGDNwr1fsm5ZOqTSOrsuwSfBXkmlzDYn9GnqVLC3Sot22F
         NdB1FD0CyM3zd35fbo/a+7G+AUwTkzU1NZliGb9KS1g1naVfA9veasXIsUig7cdTatZX
         YJ3mP89cwwXcASemY/4YLNyHz/jd1PWmUrp4rPgSMThcQAIkfhbz9+Xk3IY9fFS75E6n
         qLnQ==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:reply-to:mime-version:references
         :in-reply-to:message-id:date:subject:to:from
         :arc-authentication-results:arc-message-signature:dkim-signature
         :arc-authentication-results;
        bh=cYTQ6/hCcH/a0ruvDVXBUlJn/vkvQD1+Ab48fIDEcNw=;
        b=W5zPGoN0Ibj1gjPnzp7cy99AcJdPAgVxiPwWwBpCT0/Wgs/24qnejyEZVmkVSdzl3v
         g26/8kDh6uOSmjpCm4OQ+ajKqe6qPDIHyLUd5bLjSIU42TFocTPPT9ZBJ8o0TofhE+AC
         gsoSaBHTkDJAwS9hDoSBfRmTeSfOOgN1W8e1forSRzt4A4vpugTwQ5iWu5dyOQygQdcY
         EfyqcYotqEHQESc2FdI+o315NTM4XPpa2dS77SFmrpdZV0WV9tALeUwdFb7BeGE4HXqU
         VBvHlAAxfs2CpAkLAbjKYJO3D2ks8suUDB8IiVrvTzQ2J7tawM4eeN0UZ9enaABH4bzw
         UNiA==
ARC-Authentication-Results: i=2; mx.google.com;
       spf=pass (google.com: domain of thiago@macieira.org designates 2a01:4f8:d13:f81:21c:14ff:fe01:12a3 as permitted sender) smtp.mailfrom=thiago@macieira.org
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=from:to:subject:date:message-id:in-reply-to:references:mime-version
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=cYTQ6/hCcH/a0ruvDVXBUlJn/vkvQD1+Ab48fIDEcNw=;
        b=Y5s+BloKNPo8LSZNFze/chUcYH456Qd+o+W6tu5aZXZ9MtheJh+n48det1ynI45a2w
         xDNw51pVeOgHSrPF+5AMN+qfJA0HNeYSXUR0olRCz8EdM4c1nw8HErOpYzZqYNGUCgkV
         E8osiX8xw9xa22TM4o/BMmzK89wLKS+I8uVMqtLNp7Z0Xz9lAPWVhtGy+WJiLvcxDsLu
         lfd3zw6MtDnnTvNGW3JbF51iJ5SGLNMVw0Pkt5Wf4X1s049cZ1DkPJwaGh39Qe1vu3YL
         fM1mpnTWizGd0yY1sr36x/HFVRqwN/5x0nSC9W7YpD+Deofisk5k6oWBAbuOLEqxiu50
         rnEw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to
         :references:mime-version:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=cYTQ6/hCcH/a0ruvDVXBUlJn/vkvQD1+Ab48fIDEcNw=;
        b=W+z6y3w/WfHoEeLvbBOpfat+EnmTuo1pQTbXbUFnGyNYNmgYf44tDDDp+aOS2NZ2Kk
         8bsi+C2iZEEdC9hGo7txh0eh+XtOmugF+cbTyXYr0kWu47dop2bCIbrTHSYi+KSZgpm4
         GaHZRw98R3HPYEDQQ/26me48xGEU76Oj3ABfaZby+BHLg0CDlRn0essyBDBT+bejI8E3
         je+tymDLwG4wFvvLwYHpytYeBN3LevrJPJaJTzpnRec/eNW9c1OtkBolzj+LMFxZROwv
         pyKxCztpOZne3r21MtNrEGOEQqJLRKfoxSYNCwXcW+iFSCXMV3J0ZBS5b2ywu2DyelDj
         GrWw==
X-Gm-Message-State: AKS2vOxl9Fg79lPGeZfDlOTqKKSv6E44JolfH0jzb9F9aCW9ucQeZd4M
	RhljtuTfQlkjdnRc
X-Received: by 10.13.242.195 with SMTP id b186mr6792054ywf.22.1498018013586;
        Tue, 20 Jun 2017 21:06:53 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.36.118.195 with SMTP id z186ls944300itb.13.gmail; Tue, 20 Jun
 2017 21:06:52 -0700 (PDT)
X-Received: by 10.107.132.75 with SMTP id g72mr32061100iod.91.1498018012121;
        Tue, 20 Jun 2017 21:06:52 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1498018012; cv=none;
        d=google.com; s=arc-20160816;
        b=asYW8v+D/EKpRbLI0Z0SJE+t6obQ0/C68oOPbJ+yiooqFwSVs59axz11ulh8UJ0pV1
         RKcq0/uzVZmW8qYdkYYzIijsPj6z9Qt44WIylFitJfyUoMKiLbFXpGgtDKSV4Ef1g9x1
         +kOOrMEFQOw9PuG6wce/oOK79WvSlCofDIAdy3D3G5U0xfINORixxA/lrXIYei7ACiwI
         JwuE75l2+yP9OM87iQD2XgYN52iQwyVsY/nLoWR8UEnJBATyo19w5tuQXqsh/z0MCkn9
         AjiC0dBSbruQttLg1Ul46iCviNTKMVXj0JbG8w4vNYdZ69aKVETWvt8En9ifXqpDBtbu
         Nrkw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:to:from:arc-authentication-results;
        bh=9/mWSKBcbOdvH+23BafeEYl8/iR61Hglu48oF52OkN8=;
        b=BvWWUWIil4C8qc2wJIIeaqQKwbgrBUJTPGsf4dBvIRWecWKCa3Owzh6FKaqX6DAyrF
         KA9zKTvr4kApaoorazJbf6icNNCNaqrRZqYjLblaalMh+kSAmoYsjfYHz9G33woe1bXO
         gJXT78u5MvtdOj6JFwpkrIfC6MH2lmcAAKx9c82Wy5wM25EkZsOpnKkyZvl5LM8Qyp7n
         LZIgl5TKizr+0NWnxH6mA03kOYiviJ1dPQFTmSMqqK7T/LdtvmylTqe3x3rtPv7fRTDo
         UJErHvhob1QgwhkIEn8+/2irSuWoLYeEtlhoF8hfZUzGaSRnI/uHh9J5NhWqW4feFg6u
         MPBg==
ARC-Authentication-Results: i=1; mx.google.com;
       spf=pass (google.com: domain of thiago@macieira.org designates 2a01:4f8:d13:f81:21c:14ff:fe01:12a3 as permitted sender) smtp.mailfrom=thiago@macieira.org
Original-Received: from gondolin.macieira.info (gondolin.macieira.info. [2a01:4f8:d13:f81:21c:14ff:fe01:12a3])
        by mx.google.com with ESMTP id 81si15781597itv.117.2017.06.20.21.06.51
        for <std-proposals@isocpp.org>;
        Tue, 20 Jun 2017 21:06:51 -0700 (PDT)
Received-SPF: pass (google.com: domain of thiago@macieira.org designates 2a01:4f8:d13:f81:21c:14ff:fe01:12a3 as permitted sender) client-ip=2a01:4f8:d13:f81:21c:14ff:fe01:12a3;
Original-Received: from tjmaciei-mobl1.localnet (unknown [IPv6:2601:1c0:4501:5f9f:2168:abeb:379c:923e])
	by gondolin.macieira.info (Postfix) with ESMTPSA id A887211B299
	for <std-proposals@isocpp.org>; Tue, 20 Jun 2017 21:06:50 -0700 (PDT)
In-Reply-To: <1cdd0fbf-c65d-4034-82d1-a84d4c4f6d1c@isocpp.org>
X-Original-Sender: thiago@macieira.org
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of thiago@macieira.org designates 2a01:4f8:d13:f81:21c:14ff:fe01:12a3
 as permitted sender) smtp.mailfrom=thiago@macieira.org
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:32820
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/32820>

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.

> All it does is take a template parameter, which would be an enum type.
> 
> It would then allow you to access the individual elements of that enum, in
> order of declaration, using a nearly identical interface as std::array<>
> (i.e either through enumerators, or operator[]).

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.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center

-- 
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/2426352.kqhfR8YEAN%40tjmaciei-mobl1.

.
