Topic: Standard fixed-size literals
Author: Myriachan <myriachan@gmail.com>
Date: Tue, 6 Jan 2015 18:52:25 -0800 (PST)
Raw View
------=_Part_1863_1708408894.1420599145625
Content-Type: multipart/alternative;
boundary="----=_Part_1864_345472037.1420599145625"
------=_Part_1864_345472037.1420599145625
Content-Type: text/plain; charset=UTF-8
What do you think about fixed-size integral literals as a C++11-style
replacement for the C99-style UINT32_C() macros? I think that these would
be easier to use.
std::uint32_t = 0xDEADBEEFui32;
Implementations would be allowed to implement recognition of such tokens as
true literals if so desired, except that if there is an explicit call to operator
"" ui32(), that must be honored. This rule would avoid awkwardness with
Microsoft, since they already have some of these in their compiler as
hardwired literals.
The one weird part about this is that they wouldn't be supported at the
preprocessor level.
#include <cstdint>
namespace std {
// User-defined literals not starting with _ need not be supported (as in
clang);
// this is just expository of their properties.
std::int_least8_t operator "" i8(unsigned long long);
std::uint_least8_t operator "" ui8(unsigned long long);
std::int_least16_t operator "" i16(unsigned long long);
std::uint_least16_t operator "" ui16(unsigned long long);
std::int_least32_t operator "" i32(unsigned long long);
std::uint_least32_t operator "" ui32(unsigned long long);
std::int_least64_t operator "" i64(unsigned long long);
std::uint_least64_t operator "" ui64(unsigned long long);
// Alternate case variants I32, uI64, Ui8 etc. as well...
// For any other implemented signed bit size(s) X and unsigned bit size(s)
Y:
std::int_leastX_t operator "" iX(/*implementation-defined, rank >= unsigned
long long*/);
std::uint_leastY_t operator "" uiY(/*implementation-defined, rank >=
unsigned long long*/);
}
Melissa
--
---
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_1864_345472037.1420599145625
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">What do you think about fixed-size integral literals as a =
C++11-style replacement for the C99-style UINT32_C() macros? I think =
that these would be easier to use.<br><br>std::uint32_t =3D 0xDEADBEEFui32;=
<br><br>Implementations would <span style=3D"font-size:11.0pt;font-family:&=
quot;Calibri","sans-serif";
mso-fareast-font-family:SimSun;mso-bidi-font-family:"Times New Roman&q=
uot;;
color:#1F497D;mso-ansi-language:EN-US;mso-fareast-language:ZH-CN;mso-bidi-l=
anguage:
AR-SA"></span><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState=3D"false" DefUnhideWhenUsed=3D"true"
DefSemiHidden=3D"true" DefQFormat=3D"false" DefPriority=3D"99"
LatentStyleCount=3D"267">
<w:LsdException Locked=3D"false" Priority=3D"0" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"Normal"/>
<w:LsdException Locked=3D"false" Priority=3D"9" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"heading 1"/>
<w:LsdException Locked=3D"false" Priority=3D"9" QFormat=3D"true" Name=3D"=
heading 2"/>
<w:LsdException Locked=3D"false" Priority=3D"9" QFormat=3D"true" Name=3D"=
heading 3"/>
<w:LsdException Locked=3D"false" Priority=3D"9" QFormat=3D"true" Name=3D"=
heading 4"/>
<w:LsdException Locked=3D"false" Priority=3D"9" QFormat=3D"true" Name=3D"=
heading 5"/>
<w:LsdException Locked=3D"false" Priority=3D"9" QFormat=3D"true" Name=3D"=
heading 6"/>
<w:LsdException Locked=3D"false" Priority=3D"9" QFormat=3D"true" Name=3D"=
heading 7"/>
<w:LsdException Locked=3D"false" Priority=3D"9" QFormat=3D"true" Name=3D"=
heading 8"/>
<w:LsdException Locked=3D"false" Priority=3D"9" QFormat=3D"true" Name=3D"=
heading 9"/>
<w:LsdException Locked=3D"false" Priority=3D"39" Name=3D"toc 1"/>
<w:LsdException Locked=3D"false" Priority=3D"39" Name=3D"toc 2"/>
<w:LsdException Locked=3D"false" Priority=3D"39" Name=3D"toc 3"/>
<w:LsdException Locked=3D"false" Priority=3D"39" Name=3D"toc 4"/>
<w:LsdException Locked=3D"false" Priority=3D"39" Name=3D"toc 5"/>
<w:LsdException Locked=3D"false" Priority=3D"39" Name=3D"toc 6"/>
<w:LsdException Locked=3D"false" Priority=3D"39" Name=3D"toc 7"/>
<w:LsdException Locked=3D"false" Priority=3D"39" Name=3D"toc 8"/>
<w:LsdException Locked=3D"false" Priority=3D"39" Name=3D"toc 9"/>
<w:LsdException Locked=3D"false" Priority=3D"35" QFormat=3D"true" Name=3D=
"caption"/>
<w:LsdException Locked=3D"false" Priority=3D"10" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"Title"/>
<w:LsdException Locked=3D"false" Priority=3D"1" Name=3D"Default Paragraph=
Font"/>
<w:LsdException Locked=3D"false" Priority=3D"11" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"Subtitle"/>
<w:LsdException Locked=3D"false" Priority=3D"22" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"Strong"/>
<w:LsdException Locked=3D"false" Priority=3D"20" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"Emphasis"/>
<w:LsdException Locked=3D"false" Priority=3D"59" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Table Grid"/>
<w:LsdException Locked=3D"false" UnhideWhenUsed=3D"false" Name=3D"Placeho=
lder Text"/>
<w:LsdException Locked=3D"false" Priority=3D"1" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"No Spacing"/>
<w:LsdException Locked=3D"false" Priority=3D"60" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Light Shading"/>
<w:LsdException Locked=3D"false" Priority=3D"61" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Light List"/>
<w:LsdException Locked=3D"false" Priority=3D"62" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Light Grid"/>
<w:LsdException Locked=3D"false" Priority=3D"63" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Shading 1"/>
<w:LsdException Locked=3D"false" Priority=3D"64" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Shading 2"/>
<w:LsdException Locked=3D"false" Priority=3D"65" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium List 1"/>
<w:LsdException Locked=3D"false" Priority=3D"66" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium List 2"/>
<w:LsdException Locked=3D"false" Priority=3D"67" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 1"/>
<w:LsdException Locked=3D"false" Priority=3D"68" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 2"/>
<w:LsdException Locked=3D"false" Priority=3D"69" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 3"/>
<w:LsdException Locked=3D"false" Priority=3D"70" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Dark List"/>
<w:LsdException Locked=3D"false" Priority=3D"71" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Colorful Shading"/>
<w:LsdException Locked=3D"false" Priority=3D"72" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Colorful List"/>
<w:LsdException Locked=3D"false" Priority=3D"73" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Colorful Grid"/>
<w:LsdException Locked=3D"false" Priority=3D"60" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Light Shading Accent 1"/>
<w:LsdException Locked=3D"false" Priority=3D"61" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Light List Accent 1"/>
<w:LsdException Locked=3D"false" Priority=3D"62" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Light Grid Accent 1"/>
<w:LsdException Locked=3D"false" Priority=3D"63" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Shading 1 Accent 1"/>
<w:LsdException Locked=3D"false" Priority=3D"64" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Shading 2 Accent 1"/>
<w:LsdException Locked=3D"false" Priority=3D"65" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium List 1 Accent 1"/>
<w:LsdException Locked=3D"false" UnhideWhenUsed=3D"false" Name=3D"Revisio=
n"/>
<w:LsdException Locked=3D"false" Priority=3D"34" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"List Paragraph"/>
<w:LsdException Locked=3D"false" Priority=3D"29" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"Quote"/>
<w:LsdException Locked=3D"false" Priority=3D"30" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"Intense Quote"/>
<w:LsdException Locked=3D"false" Priority=3D"66" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium List 2 Accent 1"/>
<w:LsdException Locked=3D"false" Priority=3D"67" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 1 Accent 1"/>
<w:LsdException Locked=3D"false" Priority=3D"68" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 2 Accent 1"/>
<w:LsdException Locked=3D"false" Priority=3D"69" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 3 Accent 1"/>
<w:LsdException Locked=3D"false" Priority=3D"70" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Dark List Accent 1"/>
<w:LsdException Locked=3D"false" Priority=3D"71" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Colorful Shading Accent 1"/>
<w:LsdException Locked=3D"false" Priority=3D"72" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Colorful List Accent 1"/>
<w:LsdException Locked=3D"false" Priority=3D"73" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Colorful Grid Accent 1"/>
<w:LsdException Locked=3D"false" Priority=3D"60" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Light Shading Accent 2"/>
<w:LsdException Locked=3D"false" Priority=3D"61" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Light List Accent 2"/>
<w:LsdException Locked=3D"false" Priority=3D"62" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Light Grid Accent 2"/>
<w:LsdException Locked=3D"false" Priority=3D"63" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Shading 1 Accent 2"/>
<w:LsdException Locked=3D"false" Priority=3D"64" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Shading 2 Accent 2"/>
<w:LsdException Locked=3D"false" Priority=3D"65" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium List 1 Accent 2"/>
<w:LsdException Locked=3D"false" Priority=3D"66" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium List 2 Accent 2"/>
<w:LsdException Locked=3D"false" Priority=3D"67" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 1 Accent 2"/>
<w:LsdException Locked=3D"false" Priority=3D"68" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 2 Accent 2"/>
<w:LsdException Locked=3D"false" Priority=3D"69" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 3 Accent 2"/>
<w:LsdException Locked=3D"false" Priority=3D"70" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Dark List Accent 2"/>
<w:LsdException Locked=3D"false" Priority=3D"71" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Colorful Shading Accent 2"/>
<w:LsdException Locked=3D"false" Priority=3D"72" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Colorful List Accent 2"/>
<w:LsdException Locked=3D"false" Priority=3D"73" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Colorful Grid Accent 2"/>
<w:LsdException Locked=3D"false" Priority=3D"60" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Light Shading Accent 3"/>
<w:LsdException Locked=3D"false" Priority=3D"61" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Light List Accent 3"/>
<w:LsdException Locked=3D"false" Priority=3D"62" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Light Grid Accent 3"/>
<w:LsdException Locked=3D"false" Priority=3D"63" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Shading 1 Accent 3"/>
<w:LsdException Locked=3D"false" Priority=3D"64" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Shading 2 Accent 3"/>
<w:LsdException Locked=3D"false" Priority=3D"65" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium List 1 Accent 3"/>
<w:LsdException Locked=3D"false" Priority=3D"66" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium List 2 Accent 3"/>
<w:LsdException Locked=3D"false" Priority=3D"67" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 1 Accent 3"/>
<w:LsdException Locked=3D"false" Priority=3D"68" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 2 Accent 3"/>
<w:LsdException Locked=3D"false" Priority=3D"69" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 3 Accent 3"/>
<w:LsdException Locked=3D"false" Priority=3D"70" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Dark List Accent 3"/>
<w:LsdException Locked=3D"false" Priority=3D"71" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Colorful Shading Accent 3"/>
<w:LsdException Locked=3D"false" Priority=3D"72" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Colorful List Accent 3"/>
<w:LsdException Locked=3D"false" Priority=3D"73" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Colorful Grid Accent 3"/>
<w:LsdException Locked=3D"false" Priority=3D"60" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Light Shading Accent 4"/>
<w:LsdException Locked=3D"false" Priority=3D"61" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Light List Accent 4"/>
<w:LsdException Locked=3D"false" Priority=3D"62" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Light Grid Accent 4"/>
<w:LsdException Locked=3D"false" Priority=3D"63" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Shading 1 Accent 4"/>
<w:LsdException Locked=3D"false" Priority=3D"64" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Shading 2 Accent 4"/>
<w:LsdException Locked=3D"false" Priority=3D"65" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium List 1 Accent 4"/>
<w:LsdException Locked=3D"false" Priority=3D"66" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium List 2 Accent 4"/>
<w:LsdException Locked=3D"false" Priority=3D"67" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 1 Accent 4"/>
<w:LsdException Locked=3D"false" Priority=3D"68" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 2 Accent 4"/>
<w:LsdException Locked=3D"false" Priority=3D"69" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 3 Accent 4"/>
<w:LsdException Locked=3D"false" Priority=3D"70" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Dark List Accent 4"/>
<w:LsdException Locked=3D"false" Priority=3D"71" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Colorful Shading Accent 4"/>
<w:LsdException Locked=3D"false" Priority=3D"72" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Colorful List Accent 4"/>
<w:LsdException Locked=3D"false" Priority=3D"73" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Colorful Grid Accent 4"/>
<w:LsdException Locked=3D"false" Priority=3D"60" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Light Shading Accent 5"/>
<w:LsdException Locked=3D"false" Priority=3D"61" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Light List Accent 5"/>
<w:LsdException Locked=3D"false" Priority=3D"62" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Light Grid Accent 5"/>
<w:LsdException Locked=3D"false" Priority=3D"63" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Shading 1 Accent 5"/>
<w:LsdException Locked=3D"false" Priority=3D"64" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Shading 2 Accent 5"/>
<w:LsdException Locked=3D"false" Priority=3D"65" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium List 1 Accent 5"/>
<w:LsdException Locked=3D"false" Priority=3D"66" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium List 2 Accent 5"/>
<w:LsdException Locked=3D"false" Priority=3D"67" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 1 Accent 5"/>
<w:LsdException Locked=3D"false" Priority=3D"68" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 2 Accent 5"/>
<w:LsdException Locked=3D"false" Priority=3D"69" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 3 Accent 5"/>
<w:LsdException Locked=3D"false" Priority=3D"70" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Dark List Accent 5"/>
<w:LsdException Locked=3D"false" Priority=3D"71" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Colorful Shading Accent 5"/>
<w:LsdException Locked=3D"false" Priority=3D"72" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Colorful List Accent 5"/>
<w:LsdException Locked=3D"false" Priority=3D"73" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Colorful Grid Accent 5"/>
<w:LsdException Locked=3D"false" Priority=3D"60" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Light Shading Accent 6"/>
<w:LsdException Locked=3D"false" Priority=3D"61" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Light List Accent 6"/>
<w:LsdException Locked=3D"false" Priority=3D"62" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Light Grid Accent 6"/>
<w:LsdException Locked=3D"false" Priority=3D"63" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Shading 1 Accent 6"/>
<w:LsdException Locked=3D"false" Priority=3D"64" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Shading 2 Accent 6"/>
<w:LsdException Locked=3D"false" Priority=3D"65" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium List 1 Accent 6"/>
<w:LsdException Locked=3D"false" Priority=3D"66" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium List 2 Accent 6"/>
<w:LsdException Locked=3D"false" Priority=3D"67" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 1 Accent 6"/>
<w:LsdException Locked=3D"false" Priority=3D"68" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 2 Accent 6"/>
<w:LsdException Locked=3D"false" Priority=3D"69" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 3 Accent 6"/>
<w:LsdException Locked=3D"false" Priority=3D"70" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Dark List Accent 6"/>
<w:LsdException Locked=3D"false" Priority=3D"71" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Colorful Shading Accent 6"/>
<w:LsdException Locked=3D"false" Priority=3D"72" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Colorful List Accent 6"/>
<w:LsdException Locked=3D"false" Priority=3D"73" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Colorful Grid Accent 6"/>
<w:LsdException Locked=3D"false" Priority=3D"19" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"Subtle Emphasis"/>
<w:LsdException Locked=3D"false" Priority=3D"21" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"Intense Emphasis"/>
<w:LsdException Locked=3D"false" Priority=3D"31" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"Subtle Reference"/>
<w:LsdException Locked=3D"false" Priority=3D"32" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"Intense Reference"/>
<w:LsdException Locked=3D"false" Priority=3D"33" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"Book Title"/>
<w:LsdException Locked=3D"false" Priority=3D"37" Name=3D"Bibliography"/>
<w:LsdException Locked=3D"false" Priority=3D"39" QFormat=3D"true" Name=3D=
"TOC Heading"/>
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman","serif";}
</style>
<![endif]-->be allowed to implement recognition of such tokens as true lite=
rals if so desired, except that if there is an explicit call to <span style=
=3D"font-family: courier new,monospace;">operator "" ui32()</span>, that mu=
st be honored. This rule would avoid awkwardness with Microsoft, sinc=
e they already have some of these in their compiler as hardwired literals.<=
br><br>The one weird part about this is that they wouldn't be supported at =
the preprocessor level.<br><br><br><div class=3D"prettyprint" style=3D"back=
ground-color: rgb(250, 250, 250); border-color: rgb(187, 187, 187); border-=
style: solid; border-width: 1px; word-wrap: break-word;"><code class=3D"pre=
ttyprint"><div class=3D"subprettyprint"><span style=3D"color: #800;" class=
=3D"styled-by-prettify">#include</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #080;" class=3D"style=
d-by-prettify"><cstdint></span><span style=3D"color: #000;" class=3D"=
styled-by-prettify"><br><br></span><span style=3D"color: #008;" class=3D"st=
yled-by-prettify">namespace</span><span style=3D"color: #000;" class=3D"sty=
led-by-prettify"> std </span><span style=3D"color: #660;" class=3D"styled-b=
y-prettify">{</span><span style=3D"color: #000;" class=3D"styled-by-prettif=
y"><br><br>// User-defined literals not starting with _ need not be support=
ed (as in clang);<br>// this is just expository of their properties.<br>std=
</span><span style=3D"color: #660;" class=3D"styled-by-prettify">::</span><=
span style=3D"color: #000;" class=3D"styled-by-prettify">int_least8_t </spa=
n><span style=3D"color: #008;" class=3D"styled-by-prettify">operator</span>=
<span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span sty=
le=3D"color: #080;" class=3D"styled-by-prettify">""</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify"> i8</span><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">(</span><span style=3D"color: #008;" clas=
s=3D"styled-by-prettify">unsigned</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=3D"style=
d-by-prettify">long</span><span style=3D"color: #000;" class=3D"styled-by-p=
rettify"> </span><span style=3D"color: #008;" class=3D"styled-by-prettify">=
long</span><span style=3D"color: #660;" class=3D"styled-by-prettify">);</sp=
an><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>std</span>=
<span style=3D"color: #660;" class=3D"styled-by-prettify">::</span><span st=
yle=3D"color: #000;" class=3D"styled-by-prettify">uint_least8_t </span><spa=
n style=3D"color: #008;" class=3D"styled-by-prettify">operator</span><span =
style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"=
color: #080;" class=3D"styled-by-prettify">""</span><span style=3D"color: #=
000;" class=3D"styled-by-prettify"> ui8</span><span style=3D"color: #660;" =
class=3D"styled-by-prettify">(</span><span style=3D"color: #008;" class=3D"=
styled-by-prettify">unsigned</span><span style=3D"color: #000;" class=3D"st=
yled-by-prettify"> </span><span style=3D"color: #008;" class=3D"styled-by-p=
rettify">long</span><span style=3D"color: #000;" class=3D"styled-by-prettif=
y"> </span><span style=3D"color: #008;" class=3D"styled-by-prettify">long</=
span><span style=3D"color: #660;" class=3D"styled-by-prettify">);</span><sp=
an style=3D"color: #000;" class=3D"styled-by-prettify"><br>std</span><span =
style=3D"color: #660;" class=3D"styled-by-prettify">::</span><span style=3D=
"color: #000;" class=3D"styled-by-prettify">int_least16_t </span><span styl=
e=3D"color: #008;" class=3D"styled-by-prettify">operator</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color=
: #080;" class=3D"styled-by-prettify">""</span><span style=3D"color: #000;"=
class=3D"styled-by-prettify"> i16</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">(</span><span style=3D"color: #008;" class=3D"style=
d-by-prettify">unsigned</span><span style=3D"color: #000;" class=3D"styled-=
by-prettify"> </span><span style=3D"color: #008;" class=3D"styled-by-pretti=
fy">long</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> <=
/span><span style=3D"color: #008;" class=3D"styled-by-prettify">long</span>=
<span style=3D"color: #660;" class=3D"styled-by-prettify">);</span><span st=
yle=3D"color: #000;" class=3D"styled-by-prettify"><br>std</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">::</span><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify">uint_least16_t </span><span style=3D=
"color: #008;" class=3D"styled-by-prettify">operator</span><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #08=
0;" class=3D"styled-by-prettify">""</span><span style=3D"color: #000;" clas=
s=3D"styled-by-prettify"> ui16</span><span style=3D"color: #660;" class=3D"=
styled-by-prettify">(</span><span style=3D"color: #008;" class=3D"styled-by=
-prettify">unsigned</span><span style=3D"color: #000;" class=3D"styled-by-p=
rettify"> </span><span style=3D"color: #008;" class=3D"styled-by-prettify">=
long</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </spa=
n><span style=3D"color: #008;" class=3D"styled-by-prettify">long</span><spa=
n style=3D"color: #660;" class=3D"styled-by-prettify">);</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"><br>std</span><span style=3D=
"color: #660;" class=3D"styled-by-prettify">::</span><span style=3D"color: =
#000;" class=3D"styled-by-prettify">int_least32_t </span><span style=3D"col=
or: #008;" class=3D"styled-by-prettify">operator</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #080;" =
class=3D"styled-by-prettify">""</span><span style=3D"color: #000;" class=3D=
"styled-by-prettify"> i32</span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">(</span><span style=3D"color: #008;" class=3D"styled-by-pret=
tify">unsigned</span><span style=3D"color: #000;" class=3D"styled-by-pretti=
fy"> </span><span style=3D"color: #008;" class=3D"styled-by-prettify">long<=
/span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><sp=
an style=3D"color: #008;" class=3D"styled-by-prettify">long</span><span sty=
le=3D"color: #660;" class=3D"styled-by-prettify">);</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify"><br>std</span><span style=3D"color=
: #660;" class=3D"styled-by-prettify">::</span><span style=3D"color: #000;"=
class=3D"styled-by-prettify">uint_least32_t </span><span style=3D"color: #=
008;" class=3D"styled-by-prettify">operator</span><span style=3D"color: #00=
0;" class=3D"styled-by-prettify"> </span><span style=3D"color: #080;" class=
=3D"styled-by-prettify">""</span><span style=3D"color: #000;" class=3D"styl=
ed-by-prettify"> ui32</span><span style=3D"color: #660;" class=3D"styled-by=
-prettify">(</span><span style=3D"color: #008;" class=3D"styled-by-prettify=
">unsigned</span><span style=3D"color: #000;" class=3D"styled-by-prettify">=
</span><span style=3D"color: #008;" class=3D"styled-by-prettify">long</spa=
n><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span s=
tyle=3D"color: #008;" class=3D"styled-by-prettify">long</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">);</span><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify"><br>std</span><span style=3D"color: =
#660;" class=3D"styled-by-prettify">::</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify">int_least64_t </span><span style=3D"color: #008=
;" class=3D"styled-by-prettify">operator</span><span style=3D"color: #000;"=
class=3D"styled-by-prettify"> </span><span style=3D"color: #080;" class=3D=
"styled-by-prettify">""</span><span style=3D"color: #000;" class=3D"styled-=
by-prettify"> i64</span><span style=3D"color: #660;" class=3D"styled-by-pre=
ttify">(</span><span style=3D"color: #008;" class=3D"styled-by-prettify">un=
signed</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </s=
pan><span style=3D"color: #008;" class=3D"styled-by-prettify">long</span><s=
pan style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=
=3D"color: #008;" class=3D"styled-by-prettify">long</span><span style=3D"co=
lor: #660;" class=3D"styled-by-prettify">);</span><span style=3D"color: #00=
0;" class=3D"styled-by-prettify"><br>std</span><span style=3D"color: #660;"=
class=3D"styled-by-prettify">::</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify">uint_least64_t </span><span style=3D"color: #008;" =
class=3D"styled-by-prettify">operator</span><span style=3D"color: #000;" cl=
ass=3D"styled-by-prettify"> </span><span style=3D"color: #080;" class=3D"st=
yled-by-prettify">""</span><span style=3D"color: #000;" class=3D"styled-by-=
prettify"> ui64</span><span style=3D"color: #660;" class=3D"styled-by-prett=
ify">(</span><span style=3D"color: #008;" class=3D"styled-by-prettify">unsi=
gned</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </spa=
n><span style=3D"color: #008;" class=3D"styled-by-prettify">long</span><spa=
n style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=
=3D"color: #008;" class=3D"styled-by-prettify">long</span><span style=3D"co=
lor: #660;" class=3D"styled-by-prettify">);</span><span style=3D"color: #00=
0;" class=3D"styled-by-prettify"><br></span><span style=3D"color: #800;" cl=
ass=3D"styled-by-prettify">// Alternate case variants I32, uI64, Ui8 etc. a=
s well...</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><=
br><br></span><span style=3D"color: #800;" class=3D"styled-by-prettify">// =
For any other </span><span style=3D"color: #800;" class=3D"styled-by-pretti=
fy"><code class=3D"prettyprint"><span style=3D"color: #800;" class=3D"style=
d-by-prettify">implemented </span><span style=3D"color: #800;" class=3D"sty=
led-by-prettify"></span></code>signed bit size(s) X and unsigned bit size(s=
) Y:</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>st=
d</span><span style=3D"color: #660;" class=3D"styled-by-prettify">::</span>=
<span style=3D"color: #000;" class=3D"styled-by-prettify">int_leastX_t </sp=
an><span style=3D"color: #008;" class=3D"styled-by-prettify">operator</span=
><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span st=
yle=3D"color: #080;" class=3D"styled-by-prettify">""</span><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify"> iX</span><span style=3D"color: #=
660;" class=3D"styled-by-prettify">(</span><span style=3D"color: #800;" cla=
ss=3D"styled-by-prettify">/*implementation-defined, rank >=3D unsigned l=
ong long*/</span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
);</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>std<=
/span><span style=3D"color: #660;" class=3D"styled-by-prettify">::</span><s=
pan style=3D"color: #000;" class=3D"styled-by-prettify">uint_leastY_t </spa=
n><span style=3D"color: #008;" class=3D"styled-by-prettify">operator</span>=
<span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span sty=
le=3D"color: #080;" class=3D"styled-by-prettify">""</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify"> uiY</span><span style=3D"color: #=
660;" class=3D"styled-by-prettify">(</span><span style=3D"color: #800;" cla=
ss=3D"styled-by-prettify">/*implementation-defined, rank >=3D unsigned l=
ong long*/</span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
);</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br><br>=
</span><span style=3D"color: #660;" class=3D"styled-by-prettify">}</span><s=
pan style=3D"color: #000;" class=3D"styled-by-prettify"></span><span style=
=3D"color: #660;" class=3D"styled-by-prettify"></span><span style=3D"color:=
#000;" class=3D"styled-by-prettify"><br></span></div></code></div><br><br>=
Melissa<br></div>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" 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_1864_345472037.1420599145625--
------=_Part_1863_1708408894.1420599145625--
.
Author: Nevin Liber <nevin@eviloverlord.com>
Date: Tue, 6 Jan 2015 21:15:52 -0600
Raw View
--089e0158b50cba48a8050c07595b
Content-Type: text/plain; charset=UTF-8
On 6 January 2015 at 20:52, Myriachan <myriachan@gmail.com> wrote:
>
>
> #include <cstdint>
>
> namespace std {
>
> // User-defined literals not starting with _ need not be supported (as in
> clang);
> // this is just expository of their properties.
> std::int_least8_t operator "" i8(unsigned long long);
> std::uint_least8_t operator "" ui8(unsigned long long);
> std::int_least16_t operator "" i16(unsigned long long);
> std::uint_least16_t operator "" ui16(unsigned long long);
> std::int_least32_t operator "" i32(unsigned long long);
> std::uint_least32_t operator "" ui32(unsigned long long);
> std::int_least64_t operator "" i64(unsigned long long);
> std::uint_least64_t operator "" ui64(unsigned long long);
> // Alternate case variants I32, uI64, Ui8 etc. as well...
>
> // For any other implemented signed bit size(s) X and unsigned bit
> size(s) Y:
> std::int_leastX_t operator "" iX(/*implementation-defined, rank >=
> unsigned long long*/);
> std::uint_leastY_t operator "" uiY(/*implementation-defined, rank >=
> unsigned long long*/);
>
> }
>
While I haven't really thought it through, I would pick the exact sized
types (if they exist) instead of the at least sized types, as people who
use them with auto will expect that.
Also, why "ui" instead of just "u"? Plus, I wouldn't bother with the
variants.
--
Nevin ":-)" Liber <mailto:nevin@eviloverlord.com> (847) 691-1404
--
---
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/.
--089e0158b50cba48a8050c07595b
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">On 6 January 2015 at 20:52, Myriachan <span dir=3D"ltr">&l=
t;<a href=3D"mailto:myriachan@gmail.com" target=3D"_blank">myriachan@gmail.=
com</a>></span> wrote:<br><div class=3D"gmail_extra"><div class=3D"gmail=
_quote"><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border=
-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><br><br><div style=
=3D"background-color:rgb(250,250,250);border-color:rgb(187,187,187);border-=
style:solid;border-width:1px;word-wrap:break-word"><code><div><span style=
=3D"color:#800">#include</span><span style=3D"color:#000"> </span><span sty=
le=3D"color:#080"><cstdint></span><span style=3D"color:#000"><br><br>=
</span><span style=3D"color:#008">namespace</span><span style=3D"color:#000=
"> std </span><span style=3D"color:#660">{</span><span style=3D"color:#000"=
><br><br>// User-defined literals not starting with _ need not be supported=
(as in clang);<br>// this is just expository of their properties.<br>std</=
span><span style=3D"color:#660">::</span><span style=3D"color:#000">int_lea=
st8_t </span><span style=3D"color:#008">operator</span><span style=3D"color=
:#000"> </span><span style=3D"color:#080">""</span><span style=3D=
"color:#000"> i8</span><span style=3D"color:#660">(</span><span style=3D"co=
lor:#008">unsigned</span><span style=3D"color:#000"> </span><span style=3D"=
color:#008">long</span><span style=3D"color:#000"> </span><span style=3D"co=
lor:#008">long</span><span style=3D"color:#660">);</span><span style=3D"col=
or:#000"><br>std</span><span style=3D"color:#660">::</span><span style=3D"c=
olor:#000">uint_least8_t </span><span style=3D"color:#008">operator</span><=
span style=3D"color:#000"> </span><span style=3D"color:#080">""</=
span><span style=3D"color:#000"> ui8</span><span style=3D"color:#660">(</sp=
an><span style=3D"color:#008">unsigned</span><span style=3D"color:#000"> </=
span><span style=3D"color:#008">long</span><span style=3D"color:#000"> </sp=
an><span style=3D"color:#008">long</span><span style=3D"color:#660">);</spa=
n><span style=3D"color:#000"><br>std</span><span style=3D"color:#660">::</s=
pan><span style=3D"color:#000">int_least16_t </span><span style=3D"color:#0=
08">operator</span><span style=3D"color:#000"> </span><span style=3D"color:=
#080">""</span><span style=3D"color:#000"> i16</span><span style=
=3D"color:#660">(</span><span style=3D"color:#008">unsigned</span><span sty=
le=3D"color:#000"> </span><span style=3D"color:#008">long</span><span style=
=3D"color:#000"> </span><span style=3D"color:#008">long</span><span style=
=3D"color:#660">);</span><span style=3D"color:#000"><br>std</span><span sty=
le=3D"color:#660">::</span><span style=3D"color:#000">uint_least16_t </span=
><span style=3D"color:#008">operator</span><span style=3D"color:#000"> </sp=
an><span style=3D"color:#080">""</span><span style=3D"color:#000"=
> ui16</span><span style=3D"color:#660">(</span><span style=3D"color:#008">=
unsigned</span><span style=3D"color:#000"> </span><span style=3D"color:#008=
">long</span><span style=3D"color:#000"> </span><span style=3D"color:#008">=
long</span><span style=3D"color:#660">);</span><span style=3D"color:#000"><=
br>std</span><span style=3D"color:#660">::</span><span style=3D"color:#000"=
>int_least32_t </span><span style=3D"color:#008">operator</span><span style=
=3D"color:#000"> </span><span style=3D"color:#080">""</span><span=
style=3D"color:#000"> i32</span><span style=3D"color:#660">(</span><span s=
tyle=3D"color:#008">unsigned</span><span style=3D"color:#000"> </span><span=
style=3D"color:#008">long</span><span style=3D"color:#000"> </span><span s=
tyle=3D"color:#008">long</span><span style=3D"color:#660">);</span><span st=
yle=3D"color:#000"><br>std</span><span style=3D"color:#660">::</span><span =
style=3D"color:#000">uint_least32_t </span><span style=3D"color:#008">opera=
tor</span><span style=3D"color:#000"> </span><span style=3D"color:#080">&qu=
ot;"</span><span style=3D"color:#000"> ui32</span><span style=3D"color=
:#660">(</span><span style=3D"color:#008">unsigned</span><span style=3D"col=
or:#000"> </span><span style=3D"color:#008">long</span><span style=3D"color=
:#000"> </span><span style=3D"color:#008">long</span><span style=3D"color:#=
660">);</span><span style=3D"color:#000"><br>std</span><span style=3D"color=
:#660">::</span><span style=3D"color:#000">int_least64_t </span><span style=
=3D"color:#008">operator</span><span style=3D"color:#000"> </span><span sty=
le=3D"color:#080">""</span><span style=3D"color:#000"> i64</span>=
<span style=3D"color:#660">(</span><span style=3D"color:#008">unsigned</spa=
n><span style=3D"color:#000"> </span><span style=3D"color:#008">long</span>=
<span style=3D"color:#000"> </span><span style=3D"color:#008">long</span><s=
pan style=3D"color:#660">);</span><span style=3D"color:#000"><br>std</span>=
<span style=3D"color:#660">::</span><span style=3D"color:#000">uint_least64=
_t </span><span style=3D"color:#008">operator</span><span style=3D"color:#0=
00"> </span><span style=3D"color:#080">""</span><span style=3D"co=
lor:#000"> ui64</span><span style=3D"color:#660">(</span><span style=3D"col=
or:#008">unsigned</span><span style=3D"color:#000"> </span><span style=3D"c=
olor:#008">long</span><span style=3D"color:#000"> </span><span style=3D"col=
or:#008">long</span><span style=3D"color:#660">);</span><span style=3D"colo=
r:#000"><br></span><span style=3D"color:#800">// Alternate case variants I3=
2, uI64, Ui8 etc. as well...</span><span style=3D"color:#000"><br><br></spa=
n><span style=3D"color:#800">// For any other </span><span style=3D"color:#=
800"><code><span style=3D"color:#800">implemented </span><span style=3D"col=
or:#800"></span></code>signed bit size(s) X and unsigned bit size(s) Y:</sp=
an><span style=3D"color:#000"><br>std</span><span style=3D"color:#660">::</=
span><span style=3D"color:#000">int_leastX_t </span><span style=3D"color:#0=
08">operator</span><span style=3D"color:#000"> </span><span style=3D"color:=
#080">""</span><span style=3D"color:#000"> iX</span><span style=
=3D"color:#660">(</span><span style=3D"color:#800">/*implementation-defined=
, rank >=3D unsigned long long*/</span><span style=3D"color:#660">);</sp=
an><span style=3D"color:#000"><br>std</span><span style=3D"color:#660">::</=
span><span style=3D"color:#000">uint_leastY_t </span><span style=3D"color:#=
008">operator</span><span style=3D"color:#000"> </span><span style=3D"color=
:#080">""</span><span style=3D"color:#000"> uiY</span><span style=
=3D"color:#660">(</span><span style=3D"color:#800">/*implementation-defined=
, rank >=3D unsigned long long*/</span><span style=3D"color:#660">);</sp=
an><span style=3D"color:#000"><br><br></span><span style=3D"color:#660">}</=
span></div></code></div></div></blockquote><div><br></div><div>While I have=
n't really thought it through, I would pick the exact sized types (if t=
hey exist) instead of the at least sized types, as people who use them with=
auto will expect that.</div><div><br></div><div>Also, why "ui" i=
nstead of just "u"?=C2=A0 Plus, I wouldn't bother with the va=
riants.</div></div>-- <br><div class=3D"gmail_signature">=C2=A0Nevin "=
:-)" Liber=C2=A0 <mailto:<a href=3D"mailto:nevin@eviloverlord.com" =
target=3D"_blank">nevin@eviloverlord.com</a>>=C2=A0 (847) 691-1404</div>
</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" 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 />
--089e0158b50cba48a8050c07595b--
.
Author: Douglas Boffey <douglas.boffey@gmail.com>
Date: Wed, 7 Jan 2015 06:50:03 +0000
Raw View
+1, except I would agree with Nevin that 'least' should be dropped.
Maybe separate suffices for least and for fast?
--
---
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/.
.
Author: Ville Voutilainen <ville.voutilainen@gmail.com>
Date: Wed, 7 Jan 2015 08:53:01 +0200
Raw View
On 7 January 2015 at 08:50, Douglas Boffey <douglas.boffey@gmail.com> wrote:
> +1, except I would agree with Nevin that 'least' should be dropped.
> Maybe separate suffices for least and for fast?
And so it begins, the unstoppable creep of deathly complexity. :)
--
---
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/.
.
Author: Brian Bi <bbi5291@gmail.com>
Date: Tue, 6 Jan 2015 23:00:44 -0800
Raw View
--089e0158c15a7cdec0050c0a7b12
Content-Type: text/plain; charset=UTF-8
On Jan 6, 2015 10:53 PM, "Ville Voutilainen" <ville.voutilainen@gmail.com>
wrote:
>
> On 7 January 2015 at 08:50, Douglas Boffey <douglas.boffey@gmail.com>
wrote:
> > +1, except I would agree with Nevin that 'least' should be dropped.
> > Maybe separate suffices for least and for fast?
>
>
> And so it begins, the unstoppable creep of deathly complexity. :)
"Begins"? Really? :P
>
> --
>
> ---
> 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/.
--
---
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/.
--089e0158c15a7cdec0050c0a7b12
Content-Type: text/html; charset=UTF-8
<p dir="ltr"><br>
On Jan 6, 2015 10:53 PM, "Ville Voutilainen" <<a href="mailto:ville.voutilainen@gmail.com">ville.voutilainen@gmail.com</a>> wrote:<br>
><br>
> On 7 January 2015 at 08:50, Douglas Boffey <<a href="mailto:douglas.boffey@gmail.com">douglas.boffey@gmail.com</a>> wrote:<br>
> > +1, except I would agree with Nevin that 'least' should be dropped.<br>
> > Maybe separate suffices for least and for fast?<br>
><br>
><br>
> And so it begins, the unstoppable creep of deathly complexity. :)<br>
"Begins"? Really? :P<br>
><br>
> --<br>
><br>
> ---<br>
> You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.<br>
> To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:std-proposals%2Bunsubscribe@isocpp.org">std-proposals+unsubscribe@isocpp.org</a>.<br>
> To post to this group, send email to <a href="mailto:std-proposals@isocpp.org">std-proposals@isocpp.org</a>.<br>
> Visit this group at <a href="http://groups.google.com/a/isocpp.org/group/std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/</a>.<br>
</p>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:std-proposals+unsubscribe@isocpp.org">std-proposals+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href="mailto:std-proposals@isocpp.org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href="http://groups.google.com/a/isocpp.org/group/std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/</a>.<br />
--089e0158c15a7cdec0050c0a7b12--
.
Author: David Krauss <potswa@gmail.com>
Date: Wed, 7 Jan 2015 15:05:47 +0800
Raw View
--Apple-Mail=_C18133A0-8DC1-427F-B2A9-93F5D59B208E
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=UTF-8
> On 2015=E2=80=9301=E2=80=9307, at 2:53 PM, Ville Voutilainen <ville.vouti=
lainen@gmail.com> wrote:
>=20
> On 7 January 2015 at 08:50, Douglas Boffey <douglas.boffey@gmail.com> wro=
te:
>> +1, except I would agree with Nevin that 'least' should be dropped.
>> Maybe separate suffices for least and for fast?
>=20
> And so it begins, the unstoppable creep of deathly complexity. :)
More like full tilt. Don=E2=80=99t forget max, and a suffix for plain int w=
hich is the superlative fast type.
Has anyone tried making such a library and seeing if it=E2=80=99s even usab=
le? Compare to:
namespace short_types {
typedef int8_t i8;
typedef uint8_t u8;
// etc
}
using namespace short_types;
auto little =3D i8{ 300 }; // Narrowing error.
auto risky =3D int{ 32767 } + int{ 42 }; // Oops, we=E2=80=99re still not c=
atching these.
--=20
---=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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.
--Apple-Mail=_C18133A0-8DC1-427F-B2A9-93F5D59B208E
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset=UTF-8
<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html charset=
=3Dutf-8"></head><body style=3D"word-wrap: break-word; -webkit-nbsp-mode: s=
pace; -webkit-line-break: after-white-space;" class=3D""><br class=3D""><di=
v><blockquote type=3D"cite" class=3D""><div class=3D"">On 2015=E2=80=9301=
=E2=80=9307, at 2:53 PM, Ville Voutilainen <<a href=3D"mailto:ville.vout=
ilainen@gmail.com" class=3D"">ville.voutilainen@gmail.com</a>> wrote:</d=
iv><br class=3D"Apple-interchange-newline"><div class=3D"">On 7 January 201=
5 at 08:50, Douglas Boffey <<a href=3D"mailto:douglas.boffey@gmail.com" =
class=3D"">douglas.boffey@gmail.com</a>> wrote:<br class=3D""><blockquot=
e type=3D"cite" class=3D"">+1, except I would agree with Nevin that 'least'=
should be dropped.<br class=3D"">Maybe separate suffices for least and for=
fast?<br class=3D""></blockquote><br class=3D"">And so it begins, the unst=
oppable creep of deathly complexity. :)<br class=3D""></div></blockquote></=
div><br class=3D""><div class=3D"">More like full tilt. Don=E2=80=99t forge=
t <font face=3D"Courier" class=3D"">max</font>, and a suffix for plain <fon=
t face=3D"Courier" class=3D"">int</font> which is the superlative fast type=
..</div><div class=3D""><br class=3D""></div><div class=3D"">Has anyone trie=
d making such a library and seeing if it=E2=80=99s even usable? Compare to:=
</div><div class=3D""><br class=3D""></div><div class=3D""><font face=3D"Co=
urier" class=3D"">namespace short_types {</font></div><div class=3D""><font=
face=3D"Courier" class=3D""> typedef int8_t i8;</font></div><=
div class=3D""><font face=3D"Courier" class=3D""> typedef uint=
8_t u8;</font></div><div class=3D""><font face=3D"Courier" class=3D""> =
; // etc</font></div><div class=3D""><font face=3D"Courier" class=3D=
"">}</font></div><div class=3D""><font face=3D"Courier" class=3D""><br clas=
s=3D""></font></div><div class=3D""><font face=3D"Courier" class=3D"">using=
namespace short_types;</font></div><div class=3D""><font face=3D"Courier" =
class=3D""><br class=3D""></font></div><div class=3D""><font face=3D"Courie=
r" class=3D"">auto little =3D i8{ 300 }; // Narrowing error.</font></div><d=
iv class=3D""><font face=3D"Courier" class=3D"">auto risky =3D int{ 32767 }=
+ int{ 42 }; // Oops, we=E2=80=99re still not catching these.</font></div>=
</body></html>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" 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 />
--Apple-Mail=_C18133A0-8DC1-427F-B2A9-93F5D59B208E--
.
Author: Myriachan <myriachan@gmail.com>
Date: Wed, 7 Jan 2015 11:10:13 -0800 (PST)
Raw View
------=_Part_220_49507502.1420657813388
Content-Type: multipart/alternative;
boundary="----=_Part_221_996414725.1420657813389"
------=_Part_221_996414725.1420657813389
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
On Tuesday, January 6, 2015 7:16:34 PM UTC-8, Nevin ":-)" Liber wrote:
>
> While I haven't really thought it through, I would pick the exact sized=
=20
> types (if they exist) instead of the at least sized types, as people who=
=20
> use them with auto will expect that.
>
>
The reason I used "least" is because of the C Standard's definition of the=
=20
stdint.h [U]INT*N*_C macros (7.18.4.1 in the old n1124 May 6, 2005 draft=20
I'm looking at):
The macro INT*N*_C(*value*) shall expand to an integer constant expression=
=20
> corresponding to the type int_least*N*_t. The macro UINT*N*_C(*value*)=
=20
> shall expand to an integer constant expression corresponding to the type=
=20
> uint_least*N*_t.
The reasoning behind the "least" behavior of these macros is, I believe,=20
that a given implementation may not have an exact representation of a given=
=20
integer size, so using the "least" types for the constants ensures that=20
they can still work.
Also, why "ui" instead of just "u"? Plus, I wouldn't bother with the=20
> variants.
>
>
I thought about this; I was thinking from the Microsoft compatibility=20
perspective, where it's already implemented as ui8, ui16, ui32, ui64 in=20
VC++. There's otherwise no objection from me.
More like full tilt. Don=E2=80=99t forget max, and a suffix for plain int w=
hich is=20
> the superlative fast type.=20
>
Suffixes for [u]intmax_t are fine, but the obvious suffix for plain int, i,=
=20
might confuse someone who thinks that it might be the imaginary unit=20
instead.
Melissa
--=20
---=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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.
------=_Part_221_996414725.1420657813389
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">On Tuesday, January 6, 2015 7:16:34 PM UTC-8, Nevin ":-)" =
Liber wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-lef=
t: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr">W=
hile I haven't really thought it through, I would pick the exact sized type=
s (if they exist) instead of the at least sized types, as people who use th=
em with auto will expect that.<div><div class=3D"gmail_quote"><div><br></di=
v></div></div></div></blockquote><div><br>The reason I used "least" is beca=
use of the C Standard's definition of the stdint.h [<span style=3D"font-fam=
ily: courier new,monospace;">U</span>]<span style=3D"font-family: courier n=
ew,monospace;">INT<i><span style=3D"font-family: arial,sans-serif;">N</span=
></i></span><span style=3D"font-family: courier new,monospace;">_C</span> m=
acros (7.18.4.1 in the old n1124 May 6, 2005 draft I'm looking at):<br><br>=
<blockquote style=3D"margin: 0px 0px 0px 0.8ex; border-left: 1px solid rgb(=
204, 204, 204); padding-left: 1ex;" class=3D"gmail_quote">The macro <span s=
tyle=3D"font-family: courier new,monospace;">INT</span><i>N</i><span style=
=3D"font-family: courier new,monospace;">_C(</span><i>value</i><span style=
=3D"font-family: courier new,monospace;">)</span> shall expand to an intege=
r constant expression corresponding to the type <span style=3D"font-family:=
courier new,monospace;">int_least</span><i>N</i><span style=3D"font-family=
: courier new,monospace;">_t</span>. The macro <span style=3D"font-fa=
mily: courier new,monospace;">UINT</span><i>N</i><span style=3D"font-family=
: courier new,monospace;">_C(</span><i>value</i><span style=3D"font-family:=
courier new,monospace;">)</span> shall expand to an integer constant expre=
ssion corresponding to the type <span style=3D"font-family: courier new,mon=
ospace;">uint_least</span><i>N</i><span style=3D"font-family: courier new,m=
onospace;">_t</span>.</blockquote><br>The
reasoning behind the "least" behavior of these macros is, I believe,=20
that a given implementation may not have an exact representation of a=20
given integer size, so using the "least" types for the constants ensures
that they can still work.<br><br><br></div><blockquote class=3D"gmail_quot=
e" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;paddin=
g-left: 1ex;"><div dir=3D"ltr"><div><div class=3D"gmail_quote"><div></div><=
div>Also, why "ui" instead of just "u"? Plus, I wouldn't bother with =
the variants.</div></div><br></div></div></blockquote><div><br>I thought ab=
out this; I was thinking from the Microsoft compatibility perspective, wher=
e it's already implemented as ui8, ui16, ui32, ui64 in VC++. There's =
otherwise no objection from me.<br><br><br><blockquote style=3D"margin: 0px=
0px 0px 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1e=
x;" class=3D"gmail_quote"><div>More like full tilt. Don=E2=80=99t forget <f=
ont face=3D"Courier">max</font>, and a suffix for plain <font face=3D"Couri=
er">int</font> which is the superlative fast type. </div></blockquote>=
<div><br>Suffixes for [<span style=3D"font-family: courier new,monospace;">=
u</span>]<span style=3D"font-family: courier new,monospace;">intmax_t</span=
> are fine, but the obvious suffix for plain <span style=3D"font-family: co=
urier new,monospace;">int</span>, <span style=3D"font-family: courier new,m=
onospace;">i</span>, might confuse someone who thinks that it might be the =
imaginary unit instead.<span style=3D"font-family: courier new,monospace;">=
</span><br></div><br>Melissa<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" 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_221_996414725.1420657813389--
------=_Part_220_49507502.1420657813388--
.
Author: Nevin Liber <nevin@eviloverlord.com>
Date: Wed, 7 Jan 2015 15:20:55 -0600
Raw View
--089e013a14601e675a050c1682ce
Content-Type: text/plain; charset=UTF-8
On 7 January 2015 at 13:10, Myriachan <myriachan@gmail.com> wrote:
> The reasoning behind the "least" behavior of these macros is, I believe,
> that a given implementation may not have an exact representation of a given
> integer size, so using the "least" types for the constants ensures that
> they can still work.
>
But without type predictability, what is the point? Might as well just use
LL and ULL and be done with it. I would much prefer that it doesn't
compile if the exact representation is unavailable.
--
Nevin ":-)" Liber <mailto:nevin@eviloverlord.com> (847) 691-1404
--
---
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/.
--089e013a14601e675a050c1682ce
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div class=3D"gmail_extra">On 7 January 2015 at 13:10, Myr=
iachan <span dir=3D"ltr"><<a href=3D"mailto:myriachan@gmail.com" target=
=3D"_blank">myriachan@gmail.com</a>></span> wrote:<br><div class=3D"gmai=
l_quote"><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;borde=
r-left:1px #ccc solid;padding-left:1ex"><div>The
reasoning behind the "least" behavior of these macros is, I beli=
eve,=20
that a given implementation may not have an exact representation of a=20
given integer size, so using the "least" types for the constants =
ensures
that they can still work.<br></div></blockquote></div><br>But without type=
predictability, what is the point?=C2=A0 Might as well just use LL and ULL=
and be done with it.=C2=A0 I would much prefer that it doesn't compile=
if the exact representation is unavailable.<br>-- <br><div class=3D"gmail_=
signature">=C2=A0Nevin ":-)" Liber=C2=A0 <mailto:<a href=3D"ma=
ilto:nevin@eviloverlord.com" target=3D"_blank">nevin@eviloverlord.com</a>&g=
t;=C2=A0 (847) 691-1404</div>
</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" 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 />
--089e013a14601e675a050c1682ce--
.
Author: Myriachan <myriachan@gmail.com>
Date: Thu, 8 Jan 2015 12:04:18 -0800 (PST)
Raw View
------=_Part_38_2135002447.1420747458990
Content-Type: multipart/alternative;
boundary="----=_Part_39_1199643450.1420747458995"
------=_Part_39_1199643450.1420747458995
Content-Type: text/plain; charset=UTF-8
On Wednesday, January 7, 2015 at 1:21:36 PM UTC-8, Nevin ":-)" Liber wrote:
>
> On 7 January 2015 at 13:10, Myriachan <myri...@gmail.com <javascript:>>
> wrote:
>
>> The reasoning behind the "least" behavior of these macros is, I believe,
>> that a given implementation may not have an exact representation of a given
>> integer size, so using the "least" types for the constants ensures that
>> they can still work.
>>
>
> But without type predictability, what is the point? Might as well just
> use LL and ULL and be done with it. I would much prefer that it doesn't
> compile if the exact representation is unavailable.
>
Is it wise to break from the precedent set by the C Standard's macros,
though?
Melissa
--
---
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_39_1199643450.1420747458995
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">On Wednesday, January 7, 2015 at 1:21:36 PM UTC-8, Nevin "=
:-)" Liber wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margi=
n-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"l=
tr"><div>On 7 January 2015 at 13:10, Myriachan <span dir=3D"ltr"><<a hre=
f=3D"javascript:" target=3D"_blank" gdf-obfuscated-mailto=3D"XgQiOrH75YQJ" =
onmousedown=3D"this.href=3D'javascript:';return true;" onclick=3D"this.href=
=3D'javascript:';return true;">myri...@gmail.com</a>></span> wrote:<br><=
div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"margin=
:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>The
reasoning behind the "least" behavior of these macros is, I believe,=20
that a given implementation may not have an exact representation of a=20
given integer size, so using the "least" types for the constants ensures
that they can still work.<br></div></blockquote></div><br>But without type=
predictability, what is the point? Might as well just use LL and ULL=
and be done with it. I would much prefer that it doesn't compile if =
the exact representation is unavailable.
</div></div></blockquote><div><br>Is it wise to break from the precedent se=
t by the C Standard's macros, though?<br><br>Melissa <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" 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_39_1199643450.1420747458995--
------=_Part_38_2135002447.1420747458990--
.
Author: rhalbersma@gmail.com
Date: Thu, 8 Jan 2015 12:56:49 -0800 (PST)
Raw View
------=_Part_2_698103845.1420750609546
Content-Type: multipart/alternative;
boundary="----=_Part_3_1328159354.1420750609546"
------=_Part_3_1328159354.1420750609546
Content-Type: text/plain; charset=UTF-8
On Wednesday, January 7, 2015 at 3:52:25 AM UTC+1, Myriachan wrote:
>
> What do you think about fixed-size integral literals as a C++11-style
> replacement for the C99-style UINT32_C() macros? I think that these would
> be easier to use.
>
As the author of the post-Urbana paper N4254 ("User-Defined Literals for
size_t (and ptrdiff_t)"), I can add that I received feedback by private
communication from a national body that, apart from a tentative nod for my
proposed literals, also contained the following:
However we are a little concerned at independent papers 'nibbling away'
> at the standard UDL suffices and think that it might be better for LEWG
> to discuss the issue more holistically to make best use of the very
> small set of remaining single digit suffices.
Not quite formulated like Ville's unstoppable phrase of deathly eloquence
;-) But it does seem that a general discussion on user-defined literals is
warranted.
--
---
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_3_1328159354.1420750609546
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">On Wednesday, January 7, 2015 at 3:52:25 AM UTC+1, Myriach=
an wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: =
0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr">What=
do you think about fixed-size integral literals as a C++11-style replaceme=
nt for the C99-style UINT32_C() macros? I think that these would be e=
asier to use.<br></div></blockquote><div><br></div><div>As the author of th=
e post-Urbana<span style=3D"font-family: arial, sans-serif;"> paper N4=
254 ("User-Defined Literals for size_t (and </span><span style=3D"font=
-family: arial, sans-serif;">ptrdiff_t)"), I can add that I received feedba=
ck by private communication from a national body that, apart from a tentati=
ve nod for my proposed literals, also contained the following: </span>=
</div><br style=3D"font-family: arial, sans-serif;"><blockquote class=3D"gm=
ail_quote" style=3D"margin: 0px 0px 0px 0.8ex; border-left-width: 1px; bord=
er-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: =
1ex;"><span style=3D"font-family: arial, sans-serif;">However we are a litt=
le concerned at independent papers 'nibbling away'<br></span><span style=3D=
"font-family: arial, sans-serif;">at the standard UDL suffices and think th=
at it might be better for LEWG<br></span><span style=3D"font-family: arial,=
sans-serif;">to discuss the issue more holistically to make best use of th=
e very<br></span><span style=3D"font-family: arial, sans-serif;">small set =
of remaining single digit suffices.</span> </blockquote><div><br></div=
><div>Not quite formulated like Ville's unstoppable phrase of deathly eloqu=
ence ;-) But it does seem that a general discussion on user-defined literal=
s is warranted. </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" 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_3_1328159354.1420750609546--
------=_Part_2_698103845.1420750609546--
.
Author: Myriachan <myriachan@gmail.com>
Date: Thu, 8 Jan 2015 13:20:42 -0800 (PST)
Raw View
------=_Part_56_1512030864.1420752042080
Content-Type: multipart/alternative;
boundary="----=_Part_57_1528736297.1420752042080"
------=_Part_57_1528736297.1420752042080
Content-Type: text/plain; charset=UTF-8
On Thursday, January 8, 2015 at 12:56:49 PM UTC-8, rhalb...@gmail.com wrote:
>
> As the author of the post-Urbana paper N4254 ("User-Defined Literals for
> size_t (and ptrdiff_t)"), I can add that I received feedback by private
> communication from a national body that, apart from a tentative nod for my
> proposed literals, also contained the following:
>
>> However we are a little concerned at independent papers 'nibbling away'
>> at the standard UDL suffices and think that it might be better for LEWG
>> to discuss the issue more holistically to make best use of the very
>> small set of remaining single digit suffices.
>
>
> Not quite formulated like Ville's unstoppable phrase of deathly eloquence
> ;-) But it does seem that a general discussion on user-defined literals is
> warranted.
>
Hopefully, it can be done once and be settled, with considerable inertia
against new proposals beyond if the main ones already exist.
i = int (maybe)
i*N* = int*N*_t or int_least*N*_t
imax = intmax_t
ui*N* or u*N* (pick one) = uint*N*_t or uint_least*N*_t
uimax or umax (pick one) = uintmax_t
z = size_t
t = ptrdiff_t
j = complex<double> (imaginary)
fj = complex<float> (imaginary)
Lj = complex<long double> (imaginary)
And these already exist:
s = string (overloaded)
h = hour
min = minute
s = second (overloaded)
ms = millisecond
us = microsecond
ns = nanosecond
--
---
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_57_1528736297.1420752042080
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">On Thursday, January 8, 2015 at 12:56:49 PM UTC-8, rhalb..=
..@gmail.com wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;marg=
in-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"=
ltr">As the author of the post-Urbana<span style=3D"font-family:arial,sans-=
serif"> paper N4254 ("User-Defined Literals for size_t (and </spa=
n><span style=3D"font-family:arial,sans-serif">ptrdiff_t)"), I can add that=
I received feedback by private communication from a national body that, ap=
art from a tentative nod for my proposed literals, also contained the follo=
wing: </span><br style=3D"font-family:arial,sans-serif"><blockquote cl=
ass=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left-width:1px=
;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1e=
x"><span style=3D"font-family:arial,sans-serif">However we are a little con=
cerned at independent papers 'nibbling away'<br></span><span style=3D"font-=
family:arial,sans-serif">at the standard UDL suffices and think that it mig=
ht be better for LEWG<br></span><span style=3D"font-family:arial,sans-serif=
">to discuss the issue more holistically to make best use of the very<br></=
span><span style=3D"font-family:arial,sans-serif">small set of remaining si=
ngle digit suffices.</span> </blockquote><div><br></div><div>Not quite=
formulated like Ville's unstoppable phrase of deathly eloquence ;-) But it=
does seem that a general discussion on user-defined literals is warranted.=
</div></div></blockquote><div><br>Hopefully, it can be done once and=
be settled, with considerable inertia against new proposals beyond if the =
main ones already exist.<br><br>i =3D int (maybe)<br>i<i>N</i> =3D int<i>N<=
/i>_t or int_least<i>N</i>_t<br>imax =3D intmax_t<br>ui<i>N</i> or u<i>N</i=
> (pick one) =3D uint<i>N</i>_t or uint_least<i>N</i>_t<br>uimax or umax (p=
ick one) =3D uintmax_t<br>z =3D size_t<br>t =3D ptrdiff_t<br>j =3D complex&=
lt;double> (imaginary)<br>fj =3D complex<float> (imaginary)<br>Lj =
=3D complex<long double> (imaginary)<br><br>And these already exist:<=
br>s =3D string (overloaded)<br>h =3D hour<br>min =3D minute<br>s =3D secon=
d (overloaded)<br>ms =3D millisecond<br>us =3D microsecond<br>ns =3D nanose=
cond</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" 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_57_1528736297.1420752042080--
------=_Part_56_1512030864.1420752042080--
.
Author: Ville Voutilainen <ville.voutilainen@gmail.com>
Date: Thu, 8 Jan 2015 23:41:30 +0200
Raw View
On 8 January 2015 at 23:20, Myriachan <myriachan@gmail.com> wrote:
> Hopefully, it can be done once and be settled, with considerable inertia
> against new proposals beyond if the main ones already exist.
>
> i = int (maybe)
> iN = intN_t or int_leastN_t
> imax = intmax_t
> uiN or uN (pick one) = uintN_t or uint_leastN_t
> uimax or umax (pick one) = uintmax_t
> z = size_t
> t = ptrdiff_t
> j = complex<double> (imaginary)
> fj = complex<float> (imaginary)
> Lj = complex<long double> (imaginary)
We already have
// 26.4.10, complex literals:
inline namespace literals {
inline namespace complex_literals {
constexpr complex<long double> operator""il(long double);
constexpr complex<long double> operator""il(unsigned long long);
constexpr complex<double> operator""i(long double);
constexpr complex<double> operator""i(unsigned long long);
constexpr complex<float> operator""if(long double);
constexpr complex<float> operator""if(unsigned long long);
}
}
--
---
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/.
.
Author: Bo Persson <bop@gmb.dk>
Date: Thu, 08 Jan 2015 23:59:26 +0100
Raw View
On 2015-01-08 22:20, Myriachan wrote:
> Hopefully, it can be done once and be settled, with considerable inertia
> against new proposals beyond if the main ones already exist.
Agree that it should be settled, but it not as easy as it might seem at
first.
>
> i = int (maybe)
Isn't int the default anyway? And i has alredy been assigned to complex
(imaginary).
> i/N/ = int/N/_t or int_least/N/_t
> imax = intmax_t
Isn't this almost always the same as LL? Can you write portable code to
systems where it is not?
> ui/N/ or u/N/ (pick one) = uint/N/_t or uint_least/N/_t
What values of N are acceptable? u24? And I wouldn't want to tell
newbies that a u8 prefix means UTF-8 (u8'5') while a u8 suffix (5u8)
means something else. While both ends up being some char type?
> uimax or umax (pick one) = uintmax_t
> z = size_t
> t = ptrdiff_t
> j = complex<double> (imaginary)
> fj = complex<float> (imaginary)
And we rule out hex float literals? :-)
> Lj = complex<long double> (imaginary)
>
Bo Persson
--
---
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/.
.
Author: David Krauss <potswa@gmail.com>
Date: Fri, 9 Jan 2015 07:38:41 +0800
Raw View
--Apple-Mail=_D5E0108B-E380-45FC-8722-DDE5D6FB4141
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=UTF-8
> On 2015=E2=80=9301=E2=80=9309, at 5:20 AM, Myriachan <myriachan@gmail.com=
> wrote:
>=20
> i =3D int (maybe)
i is already the imaginary unit, as you mentioned earlier. (I facetiously s=
uggested there should be a suffix for int, but didn=E2=80=99t mention i. Th=
e obvious suffix for int is int.)
As for the exhaustive list, there are if and il too. There is no j as the i=
maginary unit, though as an electrical engineer I appreciate the sentiment.
Once again though, I don=E2=80=99t see what problem is being solved here. B=
race-initialization syntax allows you to specify a type and forbid narrowin=
g. Suffixes would be yet another initialization syntax, plus a new taxonomy=
for all integer types.
--=20
---=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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.
--Apple-Mail=_D5E0108B-E380-45FC-8722-DDE5D6FB4141
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset=UTF-8
<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html charset=
=3Dutf-8"></head><body style=3D"word-wrap: break-word; -webkit-nbsp-mode: s=
pace; -webkit-line-break: after-white-space;" class=3D""><br class=3D""><di=
v><blockquote type=3D"cite" class=3D""><div class=3D"">On 2015=E2=80=9301=
=E2=80=9309, at 5:20 AM, Myriachan <<a href=3D"mailto:myriachan@gmail.co=
m" class=3D"">myriachan@gmail.com</a>> wrote:</div><br class=3D"Apple-in=
terchange-newline"><div class=3D""><span style=3D"font-family: Helvetica; f=
ont-size: 12px; font-style: normal; font-variant: normal; font-weight: norm=
al; letter-spacing: normal; line-height: normal; orphans: auto; text-align:=
start; text-indent: 0px; text-transform: none; white-space: normal; widows=
: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; dis=
play: inline !important;" class=3D"">i =3D int (maybe)</span><br style=3D"f=
ont-family: Helvetica; font-size: 12px; font-style: normal; font-variant: n=
ormal; font-weight: normal; letter-spacing: normal; line-height: normal; or=
phans: auto; text-align: start; text-indent: 0px; text-transform: none; whi=
te-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-widt=
h: 0px;" class=3D""></div></blockquote></div><br class=3D""><div class=3D""=
><font face=3D"Courier" class=3D"">i</font> is already the imaginary unit, =
as you mentioned earlier. (I facetiously suggested there should be a suffix=
for <font face=3D"Courier" class=3D"">int</font>, but didn=E2=80=99t menti=
on <font face=3D"Courier" class=3D"">i</font>. The obvious suffix for <font=
face=3D"Courier" class=3D"">int</font> is <font face=3D"Courier" class=3D"=
">int</font>.)</div><div class=3D""><br class=3D""></div><div class=3D"">As=
for the exhaustive list, there are <font face=3D"Courier" class=3D"">if</f=
ont> and <font face=3D"Courier" class=3D"">il</font> too. There is no <font=
face=3D"Courier" class=3D"">j</font> as the imaginary unit, though as an e=
lectrical engineer I appreciate the sentiment.</div><div class=3D""><br cla=
ss=3D""></div><div class=3D"">Once again though, I don=E2=80=99t see what p=
roblem is being solved here. Brace-initialization syntax allows you to spec=
ify a type and forbid narrowing. Suffixes would be yet another initializati=
on syntax, plus a new taxonomy for all integer types.</div></body></html>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" 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 />
--Apple-Mail=_D5E0108B-E380-45FC-8722-DDE5D6FB4141--
.
Author: Thiago Macieira <thiago@macieira.org>
Date: Thu, 08 Jan 2015 16:25:02 -0800
Raw View
On Thursday 08 January 2015 13:20:42 Myriachan wrote:
> Hopefully, it can be done once and be settled, with considerable inertia
> against new proposals beyond if the main ones already exist.
>
> i = int (maybe)
What for? What's the point of adding something that will turn the expression
to something it would have been anyway without that thing? We've deprecated
the last two keywords that did that (auto and register).
The only scenario I can think of is when someone might write:
3`000`000`000i
But then we have two options: does this "throw" and cause the constexpr
function to fail to compile, thus letting the user know the constant is too
large? Or should it implicitly fold? Either behaviour is can be made a warning
by the compiler anyway.
> t = ptrdiff_t
I don't see much the point. How often do you need to create a ptrdiff_t
constant? ptrdiff_t is rare enough that I'd expect people who really want it to
prefer to explicitly write "ptrdiff_t".
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
--
---
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/.
.
Author: David Krauss <potswa@gmail.com>
Date: Fri, 9 Jan 2015 08:48:28 +0800
Raw View
--Apple-Mail=_89970348-6CFB-460E-B1CF-811E658640F9
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=UTF-8
> On 2015=E2=80=9301=E2=80=9309, at 8:25 AM, Thiago Macieira <thiago@maciei=
ra.org <mailto:thiago@macieira.org>> wrote:
>=20
> What for? What's the point of adding something that will turn the express=
ion=20
> to something it would have been anyway without that thing? We've deprecat=
ed=20
> the last two keywords that did that (auto and register).
Not all undecorated literals are int. A base-10 literal gets the lowest-ran=
k signed integer type that can hold its value, with unsignedness and minimu=
m rank determined by the suffix, if any.
> But then we have two options: does this "throw" and cause the constexpr=
=20
> function to fail to compile, thus letting the user know the constant is t=
oo=20
> large? Or should it implicitly fold? Either behaviour is can be made a wa=
rning=20
> by the compiler anyway.
Overflow behavior should be a central point of this proposal, but it hasn=
=E2=80=99t even been mentioned yet.
Suffixes are unintuitive and unreadable. If the semantics were to be fixed,=
they would be redundant with brace-initialization. If we should do anythin=
g with them, it=E2=80=99s deprecation. (I=E2=80=99d keep the u for unsigned=
, though.)
It=E2=80=99s just more grammar for the sake of more grammar.
--=20
---=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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.
--Apple-Mail=_89970348-6CFB-460E-B1CF-811E658640F9
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset=UTF-8
<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html charset=
=3Dutf-8"><meta http-equiv=3D"Content-Type" content=3D"text/html charset=3D=
utf-8"></head><body style=3D"word-wrap: break-word; -webkit-nbsp-mode: spac=
e; -webkit-line-break: after-white-space;" class=3D""><br class=3D""><div c=
lass=3D""><blockquote type=3D"cite" class=3D""><div class=3D"">On 2015=E2=
=80=9301=E2=80=9309, at 8:25 AM, Thiago Macieira <<a href=3D"mailto:thia=
go@macieira.org" class=3D"">thiago@macieira.org</a>> wrote:</div><br cla=
ss=3D"Apple-interchange-newline"><div class=3D""><span style=3D"font-family=
: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; fon=
t-weight: normal; letter-spacing: normal; line-height: normal; orphans: aut=
o; text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; fl=
oat: none; display: inline !important;" class=3D"">What for? What's the poi=
nt of adding something that will turn the expression<span class=3D"Apple-co=
nverted-space"> </span></span><br style=3D"font-family: Helvetica; fon=
t-size: 12px; font-style: normal; font-variant: normal; font-weight: normal=
; letter-spacing: normal; line-height: normal; orphans: auto; text-align: s=
tart; text-indent: 0px; text-transform: none; white-space: normal; widows: =
auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=3D""><span =
style=3D"font-family: Helvetica; font-size: 12px; font-style: normal; font-=
variant: normal; font-weight: normal; letter-spacing: normal; line-height: =
normal; orphans: auto; text-align: start; text-indent: 0px; text-transform:=
none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-s=
troke-width: 0px; float: none; display: inline !important;" class=3D"">to s=
omething it would have been anyway without that thing? We've deprecated<spa=
n class=3D"Apple-converted-space"> </span></span><br style=3D"font-fam=
ily: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; =
font-weight: normal; letter-spacing: normal; line-height: normal; orphans: =
auto; text-align: start; text-indent: 0px; text-transform: none; white-spac=
e: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;=
" class=3D""><span style=3D"font-family: Helvetica; font-size: 12px; font-s=
tyle: normal; font-variant: normal; font-weight: normal; letter-spacing: no=
rmal; line-height: normal; orphans: auto; text-align: start; text-indent: 0=
px; text-transform: none; white-space: normal; widows: auto; word-spacing: =
0px; -webkit-text-stroke-width: 0px; float: none; display: inline !importan=
t;" class=3D"">the last two keywords that did that (auto and register).</sp=
an><br style=3D"font-family: Helvetica; font-size: 12px; font-style: normal=
; font-variant: normal; font-weight: normal; letter-spacing: normal; line-h=
eight: normal; orphans: auto; text-align: start; text-indent: 0px; text-tra=
nsform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit=
-text-stroke-width: 0px;" class=3D""></div></blockquote><div class=3D""><br=
class=3D""></div><div class=3D"">Not all undecorated literals are <font fa=
ce=3D"Courier" class=3D"">int</font>. A base-10 literal gets the lowest-ran=
k signed integer type that can hold its value, with unsignedness and minimu=
m rank determined by the suffix, if any.</div><br class=3D""><blockquote ty=
pe=3D"cite" class=3D""><div class=3D"">But then we have two options: does t=
his "throw" and cause the constexpr <br class=3D""><span style=3D"font=
-family: Helvetica; font-size: 12px; font-style: normal; font-variant: norm=
al; font-weight: normal; letter-spacing: normal; line-height: normal; orpha=
ns: auto; text-align: start; text-indent: 0px; text-transform: none; white-=
space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: =
0px; float: none; display: inline !important;" class=3D"">function to fail =
to compile, thus letting the user know the constant is too<span class=3D"Ap=
ple-converted-space"> </span></span><br style=3D"font-family: Helvetic=
a; font-size: 12px; font-style: normal; font-variant: normal; font-weight: =
normal; letter-spacing: normal; line-height: normal; orphans: auto; text-al=
ign: start; text-indent: 0px; text-transform: none; white-space: normal; wi=
dows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=3D"">=
<span style=3D"font-family: Helvetica; font-size: 12px; font-style: normal;=
font-variant: normal; font-weight: normal; letter-spacing: normal; line-he=
ight: normal; orphans: auto; text-align: start; text-indent: 0px; text-tran=
sform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-=
text-stroke-width: 0px; float: none; display: inline !important;" class=3D"=
">large? Or should it implicitly fold? Either behaviour is can be made a wa=
rning<span class=3D"Apple-converted-space"> </span></span><br style=3D=
"font-family: Helvetica; font-size: 12px; font-style: normal; font-variant:=
normal; font-weight: normal; letter-spacing: normal; line-height: normal; =
orphans: auto; text-align: start; text-indent: 0px; text-transform: none; w=
hite-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-wi=
dth: 0px;" class=3D""><span style=3D"font-family: Helvetica; font-size: 12p=
x; font-style: normal; font-variant: normal; font-weight: normal; letter-sp=
acing: normal; line-height: normal; orphans: auto; text-align: start; text-=
indent: 0px; text-transform: none; white-space: normal; widows: auto; word-=
spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline =
!important;" class=3D"">by the compiler anyway.</span><br class=3D"Apple-in=
terchange-newline"></div></blockquote></div><br class=3D""><div class=3D"">=
Overflow behavior should be a central point of this proposal, but it hasn=
=E2=80=99t even been mentioned yet.</div><div class=3D""><br class=3D""></d=
iv><div class=3D"">Suffixes are unintuitive and unreadable. If the semantic=
s were to be fixed, they would be redundant with brace-initialization. If w=
e should do anything with them, it=E2=80=99s deprecation. (I=E2=80=99d keep=
the <font face=3D"Courier" class=3D"">u</font> for unsigned, though.)</div=
><div class=3D""><br class=3D""></div><div class=3D""><div class=3D"">It=E2=
=80=99s just more grammar for the sake of more grammar.</div></div></body><=
/html>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" 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 />
--Apple-Mail=_89970348-6CFB-460E-B1CF-811E658640F9--
.
Author: Thiago Macieira <thiago@macieira.org>
Date: Thu, 08 Jan 2015 21:17:27 -0800
Raw View
On Friday 09 January 2015 08:48:28 David Krauss wrote:
> Not all undecorated literals are int. A base-10 literal gets the lowest-r=
ank
> signed integer type that can hold its value, with unsignedness and minimu=
m
> rank determined by the suffix, if any.
[snip]
> Suffixes are unintuitive and unreadable. If the semantics were to be fixe=
d,
> they would be redundant with brace-initialization. If we should do anythi=
ng
> with them, it=E2=80=99s deprecation. (I=E2=80=99d keep the u for unsigned=
, though.)
What you said in the first paragraph also applies to "u".
5000000000u is unsigned long on 64-bit Linux and 5000000000ul is unsigned l=
ong=20
long on 32-bit Linux.
--=20
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
--=20
---=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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.
.