220 29331 <d3d99972-8135-44d0-9674-69d94141d0fb@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Nicol Bolas <jmckesson@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: std::byte thoughts
Date: Tue, 1 Nov 2016 20:10:28 -0700 (PDT)
Lines: 91
Approved: news@gmane.org
Message-ID: <d3d99972-8135-44d0-9674-69d94141d0fb@isocpp.org>
References: <7da80620-e4bd-40eb-a4ec-4f3c2dcb2c98@isocpp.org> <004be1ec-6455-4844-b704-7961ea745773@isocpp.org> <CAEfefmx0QMVa504JmgiOrPbq-xKjTpa5ahD9MyqrM1izU-Mkkg@mail.gmail.com>
 <1549171.TC16PSHVVd@tjmaciei-mobl1>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_3054_1783250140.1478056228810"
X-Trace: blaine.gmane.org 1478056251 5118 195.159.176.226 (2 Nov 2016 03:10:51 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Wed, 2 Nov 2016 03:10:51 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCEKFTV6ZUMBBJNS4XAAKGQEEI77PFQ@isocpp.org Wed Nov 02 04:10:46 2016
Return-path: <std-proposals+bncBCEKFTV6ZUMBBJNS4XAAKGQEEI77PFQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-pa0-f71.google.com ([209.85.220.71])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCEKFTV6ZUMBBJNS4XAAKGQEEI77PFQ@isocpp.org>)
	id 1c1lwZ-0006qQ-P9
	for gclcip-std-proposals@m.gmane.org; Wed, 02 Nov 2016 04:10:27 +0100
Original-Received: by mail-pa0-f71.google.com with SMTP id uc5sf1640545pab.4
        for <gclcip-std-proposals@m.gmane.org>; Tue, 01 Nov 2016 20:10:30 -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=o2UE/K60yWrsGCYr8Vy6g7WI+z6hMkJ9Q4ljVmr+EuY=;
        b=AGctJn6EhGncxF+xq4CoL231CeMs8VOog2VeU9AdZIsWJfE9BDJNVDuH2HQTnQGQgD
         A7UFOPZCMo5oSJVvoq0l5lYSvpGuJOAaxtK+PdKTeId5ju1barcymtc8P4xzPiHdCrLz
         ec0jv8+mCVbbHEgnxhL8/TVH/VsEAC/R4OF1MEn0SV3SZv6pogn1p+SwGiXrvS0/EmoN
         PFHfpePjmacnCKVkopzusmUJZfiZQrnnyj84TtPGKuDuGy3vZydn8DjntSA56lkFTsI6
         W3wIMa6+NFYVewS2FuTlQQooDhA50zpPDCtZRtmtjpT/OgENkTn6LCF34stnS3MkwkVl
         TkzA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        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=o2UE/K60yWrsGCYr8Vy6g7WI+z6hMkJ9Q4ljVmr+EuY=;
        b=pARsV53OunzdeQIv/55+yICag4un8IZODmgwgeFALx/Pd9YC/grreytDCYrpFxo7gC
         S12ePgQHmbg1eTdihgjh0hCGKaofyYrUtBoYKyoguGX2r4peTT+Cus+k4weTK78iGbiX
         wbEcvqDCZHZl5S9wxAvcH9gKa4YOSOIF+xR/Jh1jbd0xSCglavaV09YzC0W9eRYMZn7B
         y1ixbgD15Na9jOP0zulryGy/vQTt5tRfwaVCayvur5H2oSC7pcWk/dAGyJQJd12/p/3d
         ayL/D7oUrUMlI/4f7p3bOliQoKYZ2lzq1lpL83wd0ty+fupGG1xWb4GSLjYxYVP1L0bI
         NwLg==
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: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=o2UE/K60yWrsGCYr8Vy6g7WI+z6hMkJ9Q4ljVmr+EuY=;
        b=eR2WD26J9u2ir/yHLnNrXcf6OJ+J5cqimhF7iC/hQ4v28rnjUoLQF19LHCC6W5CxZ4
         1o+AYTj1BwTH055+R+uUv1P7vUGFYjnWSZpTU8WHbRFyrk7ijAmcLyK3hISLe34y0VjN
         c72q0zjwg47hWDGYfDyhPNb2w0FADLB+c83XpUBDPhOW3UsfdelfIks0mslyMaMjIY2Y
         gZ4ru9tu0X3Fx0YqlLRc+lx7bR2kiY8HvinJrCJpwtz1ThZO468WTkACLI0yDOiE8w25
         Fb803MG5lLbfwGSaSc7+1STJw9GBrD5sz4tDKuAc9GN92DxZX3u8QTlBjZxwJ2nG+ErL
         b+0Q==
X-Gm-Message-State: ABUngvcfiIz1vL7Qp9MwvsdQUbXwjZGkzazsWAiiHzjNL95AWuy2KpynoD7WBI1PYTAK6w==
X-Received: by 10.98.43.20 with SMTP id r20mr360044pfr.35.1478056230160;
        Tue, 01 Nov 2016 20:10:30 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.14.129 with SMTP id 1ls10811466otj.31.gmail; Tue, 01 Nov
 2016 20:10:29 -0700 (PDT)
X-Received: by 10.157.15.143 with SMTP id d15mr18593otd.2.1478056229326;
        Tue, 01 Nov 2016 20:10:29 -0700 (PDT)
In-Reply-To: <1549171.TC16PSHVVd@tjmaciei-mobl1>
X-Original-Sender: jmckesson@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:29331
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/29331>

------=_Part_3054_1783250140.1478056228810
Content-Type: multipart/alternative; 
	boundary="----=_Part_3055_1705258446.1478056228810"

------=_Part_3055_1705258446.1478056228810
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable



On Tuesday, November 1, 2016 at 9:21:27 PM UTC-4, Thiago Macieira wrote:
>
> Em ter=C3=A7a-feira, 1 de novembro de 2016, =C3=A0s 21:28:21 PDT, Dejan=
=20
> Milosavljevic=20
> escreveu:=20
> > In <cstdint> there is uint8_t.=20
> > So far it is optional.=20
> > In GCC and MSVS this type exists.=20
>
> Bytes don't have to be 8 bits.=20
>
> Note that we don't strictly need the typedef. It's just a convenience so=
=20
> that=20
> you don't see "char" and get confused.
>

Actually, no. `std::byte` as proposed by P0298 is explicitly *not* a=20
typedef. It is a scoped enumeration whose underlying type is `unsigned=20
char`, but it is not a typedef.

Granted, I can't agree with that design decision. I would much rather it be=
=20
a genuine type, rather than using C++ enum chicanery to get strong aliases.

--=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/d3d99972-8135-44d0-9674-69d94141d0fb%40isocpp.or=
g.

------=_Part_3055_1705258446.1478056228810
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>On Tuesday, November 1, 2016 at 9:21:27 PM UTC-4, =
Thiago Macieira wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;=
margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">Em ter=
=C3=A7a-feira, 1 de novembro de 2016, =C3=A0s 21:28:21 PDT, Dejan Milosavlj=
evic=20
<br>escreveu:
<br>&gt; In &lt;cstdint&gt; there is uint8_t.
<br>&gt; So far it is optional.
<br>&gt; In GCC and MSVS this type exists.
<br>
<br>Bytes don&#39;t have to be 8 bits.
<br>
<br>Note that we don&#39;t strictly need the typedef. It&#39;s just a conve=
nience so that=20
<br>you don&#39;t see &quot;char&quot; and get confused.<br></blockquote><d=
iv><br>Actually, no. `std::byte` as proposed by P0298 is explicitly <i>not<=
/i> a typedef. It is a scoped enumeration whose underlying type is `unsigne=
d char`, but it is not a typedef.<br><br>Granted, I can&#39;t agree with th=
at design decision. I would much rather it be a genuine type, rather than u=
sing C++ enum chicanery to get strong aliases.<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/d3d99972-8135-44d0-9674-69d94141d0fb%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/d3d99972-8135-44d0-9674-69d94141d0fb=
%40isocpp.org</a>.<br />

------=_Part_3055_1705258446.1478056228810--

------=_Part_3054_1783250140.1478056228810--

.
