220 29316 <CAEfefmx0QMVa504JmgiOrPbq-xKjTpa5ahD9MyqrM1izU-Mkkg@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Dejan Milosavljevic <dmilos@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: std::byte thoughts
Date: Tue, 1 Nov 2016 21:28:21 +0100
Lines: 112
Approved: news@gmane.org
Message-ID: <CAEfefmx0QMVa504JmgiOrPbq-xKjTpa5ahD9MyqrM1izU-Mkkg@mail.gmail.com>
References: <7da80620-e4bd-40eb-a4ec-4f3c2dcb2c98@isocpp.org> <004be1ec-6455-4844-b704-7961ea745773@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=94eb2c0554b06c02af0540432aa4
X-Trace: blaine.gmane.org 1478032134 12349 195.159.176.226 (1 Nov 2016 20:28:54 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Tue, 1 Nov 2016 20:28:54 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDFYFDOFWUGBBZXV4PAAKGQE4J4XWTQ@isocpp.org Tue Nov 01 21:28:49 2016
Return-path: <std-proposals+bncBDFYFDOFWUGBBZXV4PAAKGQE4J4XWTQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-oi0-f69.google.com ([209.85.218.69])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDFYFDOFWUGBBZXV4PAAKGQE4J4XWTQ@isocpp.org>)
	id 1c1ffQ-00080H-V4
	for gclcip-std-proposals@m.gmane.org; Tue, 01 Nov 2016 21:28:21 +0100
Original-Received: by mail-oi0-f69.google.com with SMTP id 128sf162128541oih.1
        for <gclcip-std-proposals@m.gmane.org>; Tue, 01 Nov 2016 13:28:24 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=mime-version:in-reply-to:references:from:date:message-id:subject:to
         :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=17R0WG3GmIsJm9uMQKlBZQTeG89Bg/GCBPMAjaOBg5s=;
        b=W4rMlRHtKhaiegHYp1NzUsN8q3I6qeiN41HtNoIi8HNQOelelN49xbf9OI9lNVdxEF
         eAj48kggdDR5SGAmQbdLBHs1NiIex/fbE8RoHFppEjTQ5s0A+vmFc9JnvlqRPpw7rRTF
         /6yypxlQ5ey2xFmCkp2PimqbpYOM29a2kuHSElpOQPDvey3cPWzCP3XKTU79PGreQK3e
         /wxNk8lPfemvsKHhkKKMQCVDJ15gyekDS0lbL9ObAhb1vWdMz2DIbBaCsog4ARn1ofkW
         DEDZXLXZfL3xJOwusxyB8KbU5JNFSNPbe7Jeor/prJ+C9RM/aS4D+J6L1EkAdFfmGOzH
         4s9g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:in-reply-to:references:from:date
         :message-id:subject:to: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=17R0WG3GmIsJm9uMQKlBZQTeG89Bg/GCBPMAjaOBg5s=;
        b=UbMHKOObxacxBFr9Am/x1Fzvbz71SI4QGW4T9KGOYzENaztfIRosIy5BVSUeCfl0g4
         fLJlbwie6sBMFmvaLdKjmZ2CLx4TOvOxVU290xFNrgTfXWF5PObQzjfv4+OYqfViqgO2
         CJtX7CmH9q4vMty7s1Ityu9D2HN26k0RhyNsvYJtu0fKmwIuNfrBiMAprp5zxVrRPxav
         kY3Qhz3C7/zlm3RP9ddVs+rrATtV11dBkkiKNRKu97cBLkulPnL28yyOJ+bUcH+dWatx
         upGlmYsYaJPKKbhiwRc4vkZsnT21nSFxHU4k+5r2qjTp+wCw658R9ifkjMhd6t8TQWBW
         O2Zg==
X-Gm-Message-State: ABUngvd182QXM6EaE+FiZxD1HYVN3kCIweEB9uF+1G6bG4SAAZ7Yh45/qAnS6MY2ULI+gA==
X-Received: by 10.157.9.240 with SMTP id 45mr37418otz.30.1478032103468;
        Tue, 01 Nov 2016 13:28:23 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.12.9 with SMTP id 9ls2961101otr.43.gmail; Tue, 01 Nov 2016
 13:28:22 -0700 (PDT)
X-Received: by 10.31.180.132 with SMTP id d126mr29825018vkf.139.1478032102668;
        Tue, 01 Nov 2016 13:28:22 -0700 (PDT)
Original-Received: from mail-qk0-x234.google.com (mail-qk0-x234.google.com. [2607:f8b0:400d:c09::234])
        by mx.google.com with ESMTPS id j1si14621345vkf.69.2016.11.01.13.28.22
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Tue, 01 Nov 2016 13:28:22 -0700 (PDT)
Received-SPF: pass (google.com: domain of dmilos@gmail.com designates 2607:f8b0:400d:c09::234 as permitted sender) client-ip=2607:f8b0:400d:c09::234;
Original-Received: by mail-qk0-x234.google.com with SMTP id q130so94196588qke.1
        for <std-proposals@isocpp.org>; Tue, 01 Nov 2016 13:28:22 -0700 (PDT)
X-Received: by 10.55.96.194 with SMTP id u185mr27067541qkb.140.1478032102259;
 Tue, 01 Nov 2016 13:28:22 -0700 (PDT)
Original-Received: by 10.12.162.98 with HTTP; Tue, 1 Nov 2016 13:28:21 -0700 (PDT)
In-Reply-To: <004be1ec-6455-4844-b704-7961ea745773@isocpp.org>
X-Original-Sender: dmilos@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com;       spf=pass (google.com: domain of dmilos@gmail.com
 designates 2607:f8b0:400d:c09::234 as permitted sender) smtp.mailfrom=dmilos@gmail.com;
       dmarc=pass (p=NONE dis=NONE) header.from=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:29316
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/29316>

--94eb2c0554b06c02af0540432aa4
Content-Type: text/plain; charset=UTF-8

In <cstdint> there is uint8_t.
So far it is optional.
In GCC and MSVS this type exists.


On Mon, Oct 31, 2016 at 2:58 PM, <mihailnajdenov@gmail.com> wrote:

> Off the top of my head.
>  - Native byte is out of question, because it will break existing code
> which defined something else behind it.
> Also it will be very confusing to have two basic types with *exactly* the
> same properties and not be "shortcuts" for one another.
>  - byte_t will break code as well.
>
> Also, you can always do a 'using std:byte' in your code and you are all
> set.
>
> That said, it is probably more correct to be called std::byte_t like
> std::size_t, std::nullptr_t, std::nullopt_t, std::align_val_t
>
> The last one is *particularly* *relevant* because it is already just enum
> class align_val_t : size_t {}; so the overloading can pick it up
>
> byte is much more akin to these basic types, then to string, vector or
> map, which don't have a _t
>
>
>
>
> --
> 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/004be1ec-6455-4844-
> b704-7961ea745773%40isocpp.org
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/004be1ec-6455-4844-b704-7961ea745773%40isocpp.org?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CAEfefmx0QMVa504JmgiOrPbq-xKjTpa5ahD9MyqrM1izU-Mkkg%40mail.gmail.com.

--94eb2c0554b06c02af0540432aa4
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>In &lt;cstdint&gt; there=C2=A0is uint8_t.</div><div>S=
o far it is optional.</div><div>In GCC and MSVS this type exists.<br><br></=
div></div><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">On Mon,=
 Oct 31, 2016 at 2:58 PM,  <span dir=3D"ltr">&lt;<a href=3D"mailto:mihailna=
jdenov@gmail.com" target=3D"_blank">mihailnajdenov@gmail.com</a>&gt;</span>=
 wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;bor=
der-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div>Off the top=
 of my head. </div><div>=C2=A0- Native byte is out of question,=C2=A0becaus=
e it will break existing code which defined something else behind it. </div=
><div>Also it will be very confusing to have two basic types with <i>exactl=
y</i>=C2=A0the same properties and not be &quot;shortcuts&quot; for one ano=
ther.</div><div>=C2=A0- byte_t will break code as well.</div><div><br></div=
><div>Also, you can always do a &#39;using std:byte&#39; in your code=C2=A0=
and you are all set. </div><div><br></div><div>That said, it is probably mo=
re correct to be called std::byte_t like std::size_t, std::nullptr_t, std::=
nullopt_t, std::align_val_t</div><div><br></div><div><div>The last one is <=
i>particularly</i> <i>relevant</i> because it is already just enum class al=
ign_val_t : size_t {}; so the overloading can pick it up</div></div><div><b=
r></div><div><div>byte is much=C2=A0more akin to these basic types, then to=
 string, vector or map, which don&#39;t have a _t</div><div><br></div></div=
><div><br></div><div><br></div><div><br></div></div><span>

<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" target=3D"_=
blank">std-proposals+unsubscribe@<wbr>isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br></span>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/004be1ec-6455-4844-b704-7961ea745773%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter" target=3D"_blank">=
https://groups.google.com/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/004b=
e1ec-6455-4844-<wbr>b704-7961ea745773%40isocpp.org</a><wbr>.<br>
</blockquote></div><br></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/CAEfefmx0QMVa504JmgiOrPbq-xKjTpa5ahD9=
MyqrM1izU-Mkkg%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">htt=
ps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAEfefmx0QMVa504J=
mgiOrPbq-xKjTpa5ahD9MyqrM1izU-Mkkg%40mail.gmail.com</a>.<br />

--94eb2c0554b06c02af0540432aa4--

.
