220 30192 <3331793.xtn2M5fU71@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: enum_cast proposal
Date: Tue, 03 Jan 2017 17:15:30 -0200
Lines: 27
Approved: news@gmane.org
Message-ID: <3331793.xtn2M5fU71@tjmaciei-mobl1>
References: <efdf2357-00a6-408a-8772-12f99135a880@isocpp.org> <a19ed9c6-45c0-e3d7-e92a-06468bff63b7@wanadoo.fr> <119a6ed9-e6b1-4c8c-b9b1-5152f7c7a3d6@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
Content-Transfer-Encoding: quoted-printable
X-Trace: blaine.gmane.org 1483470956 13775 195.159.176.226 (3 Jan 2017 19:15:56 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Tue, 3 Jan 2017 19:15:56 +0000 (UTC)
User-Agent: KMail/5.3.3 (Linux/4.8.13-1-default; KDE/5.28.0; x86_64; ; )
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCB4TK757YBRBWXQV7BQKGQEFD6ODHQ@isocpp.org Tue Jan 03 20:15:43 2017
Return-path: <std-proposals+bncBCB4TK757YBRBWXQV7BQKGQEFD6ODHQ@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+bncBCB4TK757YBRBWXQV7BQKGQEFD6ODHQ@isocpp.org>)
	id 1cOUYZ-00017T-2y
	for gclcip-std-proposals@m.gmane.org; Tue, 03 Jan 2017 20:15:35 +0100
Original-Received: by mail-pf0-f198.google.com with SMTP id 17sf749155231pfy.2
        for <gclcip-std-proposals@m.gmane.org>; Tue, 03 Jan 2017 11:15:39 -0800 (PST)
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:user-agent:in-reply-to:references
         :mime-version:content-transfer-encoding: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=EmeiWh8+NI39UxMQ55CNcddChfsvup/A+M4LQflrY5k=;
        b=m9E44p/y8+ZqaPkX4+gzrCMRcGymx5ilhcygS+YZQwSObaEC9K6d5ckMD6FlDS5ptB
         /bSSpbFAxMsCkV7wiLruchH6uQbw8h8HcFnh+0OWHWtr6/EJiCZh7kUO759biYlfRMDY
         CWg2G4qITv4jBYfu26yZ64zvcmrhjjuY7RsnPbwVFOk7m9godh0BbRqMaitCZDZ+U9uf
         5N2/RPanSb25/ybYyQ95eNtJP48fn5aTSmWHL547nx+v2IdHTQx+erU+a7gVwkiaQNdq
         j0Db6tdsFcvCX1hlGEf/DfbLL5REh7oxqJyWM5DcwsOpuIWnM5s1sfZIlqGfXr19u23j
      
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:user-agent
         :in-reply-to:references:mime-version:content-transfer-encoding
         :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=EmeiWh8+NI39UxMQ55CNcddChfsvup/A+M4LQflrY5k=;
        b=RlMVRmso+IliedAQ91+3EJFC05/Lx2JxhMye/Jvdv8DcNHa/wUX8e1FuHyYRR6pubg
         9ToCxFHvDB0qdjv5xH2J4h9HR/pgV6Cmyr94fKw65NNhYLU6HmJXRFAnjtBBBJF7Ze1R
         Tc21qaoU5gWP5BCUyeT18qBx88bP5P64bmxCKtTxyd7eKAt2fVqJ6r20sRWNGO+dWyVz
         YG7cXaa9xmgq8J51J+3T2klzAiala9okRkTDNkRp2A7KnV6X5Nu8Hs7TwaquIFyHbhMC
         xRDjBkNg1+rtV1lJzT1BIUliY1VFb2WtgHODmH1XjBLcaihQW7NtDMPEzSzW2rSZWoKZ
  
X-Gm-Message-State: AIkVDXI423Qfz1vCm4OXvrGou5P4H7ul22vGrfRD5p4XOeape0VEdCSwy/Vbhpg3FwPrKg==
X-Received: by 10.99.124.13 with SMTP id x13mr35322031pgc.97.1483470938975;
        Tue, 03 Jan 2017 11:15:38 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.45.195 with SMTP id g61ls39119467otb.37.gmail; Tue, 03 Jan
 2017 11:15:38 -0800 (PST)
X-Received: by 10.55.74.21 with SMTP id x21mr59907733qka.46.1483470938166;
        Tue, 03 Jan 2017 11:15:38 -0800 (PST)
Original-Received: from gondolin.macieira.info (gondolin.macieira.info. [2a01:4f8:d13:f81:21c:14ff:fe01:12a3])
        by mx.google.com with ESMTP id l128si33502243qkf.269.2017.01.03.11.15.38
        for <std-proposals@isocpp.org>;
        Tue, 03 Jan 2017 11:15:38 -0800 (PST)
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 [187.34.234.250])
	by gondolin.macieira.info (Postfix) with ESMTPSA id A2A9611B7FC
	for <std-proposals@isocpp.org>; Tue,  3 Jan 2017 11:15:32 -0800 (PST)
In-Reply-To: <119a6ed9-e6b1-4c8c-b9b1-5152f7c7a3d6@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:30192
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/30192>

On ter=C3=A7a-feira, 3 de janeiro de 2017 10:43:41 BRST Nicol Bolas wrote:
> What's the point of `enum_cast`, save the fact that it would SFINAE on th=
e
> given type being an actual enumeration? `static_cast` is the standard way
> of saying "make this integer an enum without checking". I don't think we
> need another way to spell that.

One of two ways. You can always just use the enumeration in constructor sty=
le:

	Enum(1)		<=3D>		static_cast<Enum>(1)

This is a matter of coding convention.

--=20
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center

--=20
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 e=
mail 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/3331793.xtn2M5fU71%40tjmaciei-mobl1.

.
