220 30739 <3b2e3df8-20d7-475d-8461-babed4f6354f@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Tristan Brindle <tcbrindle@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: UDLs for fixed-width integer types
Date: Wed, 1 Feb 2017 12:24:55 -0800 (PST)
Lines: 87
Approved: news@gmane.org
Message-ID: <3b2e3df8-20d7-475d-8461-babed4f6354f@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_362_60733521.1485980695121"
X-Trace: blaine.gmane.org 1485980697 23352 195.159.176.226 (1 Feb 2017 20:24:57 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Wed, 1 Feb 2017 20:24:57 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCXMHUPP7AERBF4IZHCAKGQE3HSEAMQ@isocpp.org Wed Feb 01 21:24:52 2017
Return-path: <std-proposals+bncBCXMHUPP7AERBF4IZHCAKGQE3HSEAMQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-oi0-f72.google.com ([209.85.218.72])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCXMHUPP7AERBF4IZHCAKGQE3HSEAMQ@isocpp.org>)
	id 1cZ1SV-0005ps-A4
	for gclcip-std-proposals@m.gmane.org; Wed, 01 Feb 2017 21:24:51 +0100
Original-Received: by mail-oi0-f72.google.com with SMTP id w144sf439722027oiw.0
        for <gclcip-std-proposals@m.gmane.org>; Wed, 01 Feb 2017 12:24:57 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to:message-id: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=NQcpdR4aw1WSO+2wzs8pIWg+K5qk4tLNvVO5tVE2zv4=;
        b=06ydn0K7DB0CRiMK96WQlRhgT+bUlb4KhU0eUu/9r+1aYE41eRpo5z31AgmWuNLH2m
         gszdx/W2hDb5b2utvS5VF0/TCFTUNiFq2a2i3ROhwtSWzRoXeHbapOBV/bzgyQ3JzfRn
         jKdvrw/smfTz5gev7IQn0WpS0W1Kx2GzGm8ATjJS49WtAbZSG+4tGTysBjBAMLIS3G0X
         Tp0q2piubnic6TkLIibv4X1HkG97CBszfPr0Xs3q2jM27ECAlx5WWb5PYTsFtUkqFkBM
         ZCczSghTtMGEpUrTKj8JkM9b4R+DZmrMruNFRyUU6qYVruFTmtPJGBXdO343WvFq4bP+
         mxMg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=date:from:to:message-id: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=NQcpdR4aw1WSO+2wzs8pIWg+K5qk4tLNvVO5tVE2zv4=;
        b=ecEY6ASQmlwI/7/SQYzuoBRoZdgCmV+HqlzNL26wxJSNqDK0HFQMlflImFEyysNFRh
         t2JmNHD9O2gRyRjzYwzt1pFzbzCgwlHMXSw2JQUl7u6OfXS12NjrFh0/MEwmMI91dCil
         g4yCJ1fcqurkw6yr2LQ9vN5df7ytUbtOVB8aKX1mRJXfLDo+tKw/qo8nxtHnOLN5JhXh
         2ia4iE7VVCeyqdt3mwL1qLEQZaecewo4RKzE/WYxCTUDIDpwNgnz1MEMkj8t7e+O+YPH
         1qUIeTnMmKL3gMvXswuwIvJnuW4bUXGk00G0Svyrx+s77CIltxMKhQweVsWW92W6LwlM
         uZJA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:date:from:to:message-id: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=NQcpdR4aw1WSO+2wzs8pIWg+K5qk4tLNvVO5tVE2zv4=;
        b=aBo6I4MXfAwurpPCyBVqyPyOPsQWSkGPa7sLYHSCUCcGw+rBdlXctRWwkMFI/KJitD
         sMkMKzYupAxPc62Inf/+9JLQ3iEFQye72q2MAFe53mg47uFVM8dgkO+jtcCV1+KrhrYM
         zlTt689yidISuHMuu3uqEL3GwDdLoZMckLqTnaA7dl3SZd1ksjt1N52BGEg4PiFmuYff
         4GXnPlrrJGFLjdmRe/4ckowKEVs1oXJJRMdtxJTzKvHOB24v1DEsUKq6QUHAU6yaxh0t
         4CqmVHG2cORjgZ0YsGoLLuhwSGZ7egzieqHQR0Srje++y8lJNU34ysMZIjGvP2grcuok
         EC6w==
X-Gm-Message-State: AMke39m7IvLYEJfXje6jcOlD1uJFybmqQOElEpMtS9wOkFnZbLSh2J1KFeAVr5eOR3S4LA==
X-Received: by 10.157.11.245 with SMTP id 108mr1320451oth.142.1485980696303;
        Wed, 01 Feb 2017 12:24:56 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.11.115 with SMTP id p48ls2260129otd.19.gmail; Wed, 01 Feb
 2017 12:24:55 -0800 (PST)
X-Received: by 10.157.12.165 with SMTP id b34mr636075otb.2.1485980695561;
        Wed, 01 Feb 2017 12:24:55 -0800 (PST)
X-Original-Sender: tcbrindle@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:30739
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/30739>

------=_Part_362_60733521.1485980695121
Content-Type: multipart/alternative; 
	boundary="----=_Part_363_1241895113.1485980695122"

------=_Part_363_1241895113.1485980695122
Content-Type: text/plain; charset=UTF-8


I think a small-but-worthwhile addition to the standard library would be to 
add user-defined literals for the various fixed-width integer types defined 
in <cstdint>, for example

  using namespace std::literals;

  auto a = 0u64;   // a is std::uint64_t
  auto b = 0i16;   // b is std::int16_t

to complement the core language-provided literals such as

   auto c = 0ul;  // c is unsigned long

As far a I can see there have been no papers proposing this to date, 
although P0330r0 
<http://open-std.org/JTC1/SC22/WG21/docs/papers/2016/p0330r0.pdf> (proposing 
the zu literal for size_t)  mentions it as a possible direction for further 
work.

Before I go hacking up a paper of my own however, I guess I should canvas a 
general opinion: basically, is this something that is worthwhile to pursue, 
or is it likely to get quickly shot down in committee?


Thanks,

Tristan

-- 
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/3b2e3df8-20d7-475d-8461-babed4f6354f%40isocpp.org.

------=_Part_363_1241895113.1485980695122
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><div>I think a small-but-worthwhile addition to the st=
andard library would be to add user-defined literals for the various fixed-=
width integer types defined in &lt;cstdint&gt;, for example</div><div><br><=
/div><div><font face=3D"courier new, monospace">=C2=A0 using namespace std:=
:literals;</font></div><div><font face=3D"courier new, monospace"><br></fon=
t></div><div><font face=3D"courier new, monospace">=C2=A0 auto a =3D 0u64; =
=C2=A0 // a is std::uint64_t</font></div><div><font face=3D"courier new, mo=
nospace">=C2=A0 auto b =3D 0i16; =C2=A0 // b is std::int16_t</font></div><d=
iv><br></div><div>to complement the core language-provided literals such as=
</div><div><br></div><div>=C2=A0 =C2=A0<font face=3D"courier new, monospace=
">auto c =3D 0ul; =C2=A0// c is unsigned long</font></div><div><br></div><d=
iv>As far a I can see there have been no papers proposing this to date, alt=
hough=C2=A0<a href=3D"http://open-std.org/JTC1/SC22/WG21/docs/papers/2016/p=
0330r0.pdf">P0330r0</a>=C2=A0(proposing the=C2=A0<font face=3D"courier new,=
 monospace">zu</font>=C2=A0literal for size_t) =C2=A0mentions it as a possi=
ble direction for further work.</div><div><br></div><div>Before I go hackin=
g up a paper of my own however, I guess I should canvas a general opinion: =
basically, is this something that is worthwhile to pursue, or is it likely =
to get quickly shot down in committee?</div><div><br></div><div><br></div><=
div>Thanks,</div><div><br></div><div>Tristan</div><div><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/3b2e3df8-20d7-475d-8461-babed4f6354f%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/3b2e3df8-20d7-475d-8461-babed4f6354f=
%40isocpp.org</a>.<br />

------=_Part_363_1241895113.1485980695122--

------=_Part_362_60733521.1485980695121--

.
