220 9933 <f9e04799-dee0-4196-875e-e1a1692f2434@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Matheus Izvekov <mizvekov@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Explicitly-defaulted enumeration operators
Date: Wed, 19 Mar 2014 16:33:42 -0700 (PDT)
Lines: 119
Approved: news@gmane.org
Message-ID: <f9e04799-dee0-4196-875e-e1a1692f2434@isocpp.org>
References: <3B09C97E-7ADE-49ED-8C31-B5B41CD3DDE7@gmail.com> <781009e3-cd3c-4cb8-b034-b51a7c97c750@isocpp.org> <E797CAFE-4967-4881-870D-569BF15C757E@gmail.com> <10450602-fee9-48c4-9fa2-d000e434f5fb@isocpp.org> <6F532E62-C10A-404A-8F0D-662B7EA3D202@gmail.com> <24e85eaf-e67b-4a0b-acee-47d996d6f6ee@isocpp.org> <7F327393-B9EF-46EB-A40E-86F80EFEF5BD@gmail.com> <c17acc18-db6f-4233-b819-49bb623259dd@isocpp.org> <lgcl91$uln$1@ger.gmane.org> <e37e5153-7712-4890-a2af-88f73ef27ebc@isocpp.org>
 <532A2217.10905@users.sourceforge.net>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_56_2736425.1395272022717"
X-Trace: ger.gmane.org 1395272016 18945 80.91.229.3 (19 Mar 2014 23:33:36 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 19 Mar 2014 23:33:36 +0000 (UTC)
Cc: matthew.woehlke@kitware.com
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCOKZ27XTMNRBWGSVCMQKGQERM3LLLI@isocpp.org Thu Mar 20 00:33:46 2014
Return-path: <std-proposals+bncBCOKZ27XTMNRBWGSVCMQKGQERM3LLLI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ig0-f199.google.com ([209.85.213.199])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCOKZ27XTMNRBWGSVCMQKGQERM3LLLI@isocpp.org>)
	id 1WQPzV-0001A1-E0
	for gclcip-std-proposals@m.gmane.org; Thu, 20 Mar 2014 00:33:45 +0100
Original-Received: by mail-ig0-f199.google.com with SMTP id uy17sf748394igb.2
        for <gclcip-std-proposals@m.gmane.org>; Wed, 19 Mar 2014 16:33:44 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to:cc: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:content-type;
        bh=MwfgSz9LwBbA5ymbttUKwi9Va89m/r6GGHHl6S6UBD8=;
        b=rSc2V16ciIlDeAjNoqbdjhhummBDmwUg8E194blvR/tNuZYsb79KQN28uCFRM6ZfO0
         2qaC+QrlAdqv0qniSEvQdaLM13pBLNsTyx5jdKjE+FwjN1Jora6ixkZ9nb5PWVqjbRp9
         6nVDcWNCTHyFAjconK7ghM7J4OOrHPX2BWRc4Y3WzL3czTk3Q7bsgYTjNKGcf/fULX/B
         lJo0YQ9XVbEdZefuGE4mHDwk7e7CFLWUZwTgq+11pZpPMCyRE50GH/ExKvqmHijM6Yg/
         /c7jjfXLSZggNe5SYZnGa5PO4HrlMa0hH67lunoCp+lTWd5nNKScobF5SUMEA87852v7
         gcwA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:date:from:to:cc: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:content-type;
        bh=MwfgSz9LwBbA5ymbttUKwi9Va89m/r6GGHHl6S6UBD8=;
        b=YhktYjDUmSxpU5xuhqeNxzQEmWXSNh7MTTSSRgOU9Z4PMozS9BqFGj5SC8eGWlmE0B
         JhzrziRLZ3hjoglfszawOrr3vtJ6+XRoAXyHP98dODpLfkFTJTPNpjTtLGiCALANh7oW
         pfzuJ45twwEN+lZB7b+s+zg2eE7um+9/uD6+TQMIiJqSN9kzhOi9/tJNxJw+FhLvdrfO
         UMzUGD+g4QijAE/QXGE5qTZ5E9xD6MV/S11iMg03zBCFEzjdJWRRfjQK89NHw6C28H93
         U+GsrQZrmnKvu1K2E4fCIS4V0BsfJra+tGz44FxJ0J2r1kaG+X4sKfR+ajU6LlU7X+1Y
         +4+g==
X-Gm-Message-State: ALoCoQlLqyxyNV8zWDAE1XK8gtJcx7BLc/R9TfqlWiAWck1aOouMeg5sBHIeq96jSEgcc5Nvexlk
X-Received: by 10.42.53.135 with SMTP id n7mr14927941icg.11.1395272024494;
        Wed, 19 Mar 2014 16:33:44 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.140.18.175 with SMTP id 44ls19159qgf.24.gmail; Wed, 19 Mar
 2014 16:33:43 -0700 (PDT)
X-Received: by 10.140.48.235 with SMTP id o98mr765qga.35.1395272023835;
        Wed, 19 Mar 2014 16:33:43 -0700 (PDT)
In-Reply-To: <532A2217.10905@users.sourceforge.net>
X-Original-Sender: mizvekov@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:9933
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/9933>

------=_Part_56_2736425.1395272022717
Content-Type: text/plain; charset=UTF-8

On Wednesday, March 19, 2014 8:02:47 PM UTC-3, Matthew Woehlke wrote:
>
> (I'm leaving the entirety of Matheus text as something appears to have 
> eaten that message...) 
>
>
It also ate yours. Got them on my email but they don't show up on google 
groups web interface.
 

>
> Heh. I had one originally, and decided to remove it because I'm not sure 
> of the answer :-). Intuitively I would say "yes", because if all values 
> of A are also values of B, it makes sense to allow promotion from A to 
> B, unless such has been explicitly denied. 
>
>
It's also kind of the opposite behavior of an enum class deriving from int 
though,
where implicit conversions both ways are disallowed.
 

>
> Probably 'int', a) for the reasons you give above, and b) because I do 
> think multiple inheritance should be allowed. And I would further agree 
> that obtaining type 'A' from type 'B' should use the same mechanism as 
> for "true" classes (which among other things would imply that 
> is_base_of(A, B) => true). 
>
>
I think making enums full on class-like has been discussed before, but I 
can't
find where / which thread it was discussed on.
But as far as I remember, it came out unfavorably.

I am in favor of allowing literal types as enum underlying types, and if 
you allow
full on enum classes like that, then using a literal class type as 
underlying type could get really hairy.

On the other hand, IMHO making enum classes have similar semantics to 
opaque typedefs seems a lot simpler
and fits better, because as they stand right now, they are a lot like an 
opaque typedef, but unfortunately support just fundamental integers.

-- 

--- 
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/.

------=_Part_56_2736425.1395272022717
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Wednesday, March 19, 2014 8:02:47 PM UTC-3, Matthew Woe=
hlke wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left=
: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">(I'm leaving the en=
tirety of Matheus text as something appears to have=20
<br>eaten that message...)
<br>
<br></blockquote><div><br>It also ate yours. Got them on my email but they =
don't show up on google groups web interface.<br>&nbsp;</div><blockquote cl=
ass=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px =
#ccc solid;padding-left: 1ex;"><br>Heh. I had one originally, and decided t=
o remove it because I'm not sure=20
<br>of the answer :-). Intuitively I would say "yes", because if all values=
=20
<br>of A are also values of B, it makes sense to allow promotion from A to=
=20
<br>B, unless such has been explicitly denied.
<br>
<br></blockquote><div><br>It's also kind of the opposite behavior of an enu=
m class deriving from int though,<br>where implicit conversions both ways a=
re disallowed.<br>&nbsp;</div><blockquote class=3D"gmail_quote" style=3D"ma=
rgin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">
<br>Probably 'int', a) for the reasons you give above, and b) because I do=
=20
<br>think multiple inheritance should be allowed. And I would further agree=
=20
<br>that obtaining type 'A' from type 'B' should use the same mechanism as=
=20
<br>for "true" classes (which among other things would imply that=20
<br>is_base_of(A, B) =3D&gt; true).
<br>
<br></blockquote><div><br>I think making enums full on class-like has been =
discussed before, but I can't<br>find where / which thread it was discussed=
 on.<br>But as far as I remember, it came out unfavorably.<br><br>I am in f=
avor of allowing literal types as enum underlying types, and if you allow<b=
r>full on enum classes like that, then using a literal class type as underl=
ying type could get really hairy.<br><br>On the other hand, IMHO making enu=
m classes have similar semantics to opaque typedefs seems a lot simpler<br>=
and fits better, because as they stand right now, they are a lot like an op=
aque typedef, but unfortunately support just fundamental integers.<br></div=
></div>

<p></p>

-- <br />
<br />
--- <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 />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_56_2736425.1395272022717--

.
