Topic: percent ('%') operator for floating-point types...


Author: ron novy <rsn10100@gmail.com>
Date: Mon, 29 Sep 2014 01:47:33 -0700 (PDT)
Raw View
------=_Part_272_1188127921.1411980453253
Content-Type: text/plain; charset=UTF-8

Not a modulo (integer remainder) operator, but a new operator specifically
for floating-point literals so we can do the following.

#include <iostream>
using namespace std;

/*
Possible overrides for this operator could be:
As a member of 'K':
R K::operator %(int);

and outside of class definitions:
R operator %(K a, int);

*/

void foo(float x, double y)
{
    cout << x << endl;
    cout << y << endl;
}

int main()
{
    foo(50.0%, 100.0%);
    return 0;
}
/*
Output:
0.5
1
*/


Not terribly complicated and not really too important, but it would
certainly make some things much easier and more beautiful.  This shouldn't
affect older code since the modulo operator is currently forbidden on
floating-point types and causes a compiler error when used with float,
double and long double.

--

---
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_272_1188127921.1411980453253
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Not a modulo (integer remainder) operator, but a new opera=
tor specifically for floating-point literals so we can do the following.<di=
v><br></div><div><div class=3D"prettyprint" style=3D"border: 1px solid rgb(=
187, 187, 187); word-wrap: break-word; background-color: rgb(250, 250, 250)=
;"><code class=3D"prettyprint"><div class=3D"subprettyprint"><span style=3D=
"color: #800;" class=3D"styled-by-prettify">#include</span><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #08=
0;" class=3D"styled-by-prettify">&lt;iostream&gt;</span><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify"><br></span><span style=3D"color: #00=
8;" class=3D"styled-by-prettify">using</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=3D"s=
tyled-by-prettify">namespace</span><span style=3D"color: #000;" class=3D"st=
yled-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></span><span style=3D"color: #800;" class=3D"styled-by-prettify"=
>/*<br></span><div style=3D"color: rgb(34, 34, 34); font-family: Arial, Hel=
vetica, sans-serif; background-color: rgb(255, 255, 255);"><span style=3D"c=
olor: #800;" class=3D"styled-by-prettify">Possible overrides for this opera=
tor could be:</span></div><div style=3D"color: rgb(34, 34, 34); font-family=
: Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);"><div=
><span style=3D"color: #800;" class=3D"styled-by-prettify">As a member of '=
K': <br></span><span style=3D"color: rgb(136, 0, 0);"><span style=3D"color:=
 #800;" class=3D"styled-by-prettify">R K::operator %(int);</span></span></d=
iv><div><span style=3D"color: #800;" class=3D"styled-by-prettify"><br>and <=
/span><span style=3D"color: rgb(136, 0, 0);"><span style=3D"color: #800;" c=
lass=3D"styled-by-prettify">outside of class definitions:</span></span></di=
v><div><span style=3D"color: #800;" class=3D"styled-by-prettify">R operator=
 %(K a, int);</span></div><div><span style=3D"color: #800;" class=3D"styled=
-by-prettify"><br></span></div></div><span style=3D"color: #800;" class=3D"=
styled-by-prettify">*/</span><span style=3D"color: #000;" class=3D"styled-b=
y-prettify"><br><br></span><span style=3D"color: #008;" class=3D"styled-by-=
prettify">void</span><span style=3D"color: #000;" class=3D"styled-by-pretti=
fy"> foo</span><span style=3D"color: #660;" class=3D"styled-by-prettify">(<=
/span><span style=3D"color: #008;" class=3D"styled-by-prettify">float</span=
><span style=3D"color: #000;" class=3D"styled-by-prettify"> x</span><span s=
tyle=3D"color: #660;" class=3D"styled-by-prettify">,</span><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #00=
8;" class=3D"styled-by-prettify">double</span><span style=3D"color: #000;" =
class=3D"styled-by-prettify"> y</span><span style=3D"color: #660;" class=3D=
"styled-by-prettify">)</span><span style=3D"color: #000;" class=3D"styled-b=
y-prettify"> <br></span><span style=3D"color: #660;" class=3D"styled-by-pre=
ttify">{</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><b=
r>&nbsp; &nbsp; cout </span><span style=3D"color: #660;" class=3D"styled-by=
-prettify">&lt;&lt;</span><span style=3D"color: #000;" class=3D"styled-by-p=
rettify"> x </span><span style=3D"color: #660;" class=3D"styled-by-prettify=
">&lt;&lt;</span><span style=3D"color: #000;" class=3D"styled-by-prettify">=
 endl</span><span style=3D"color: #660;" class=3D"styled-by-prettify">;</sp=
an><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>&nbsp; &nb=
sp; cout </span><span style=3D"color: #660;" class=3D"styled-by-prettify">&=
lt;&lt;</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> y =
</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;&lt;</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"> endl</span>=
<span style=3D"color: #660;" class=3D"styled-by-prettify">;</span><span sty=
le=3D"color: #000;" class=3D"styled-by-prettify"><br></span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">}</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"><br><br></span><span style=3D"color: #008=
;" class=3D"styled-by-prettify">int</span><span style=3D"color: #000;" clas=
s=3D"styled-by-prettify"> main</span><span style=3D"color: #660;" class=3D"=
styled-by-prettify">()</span><span style=3D"color: #000;" class=3D"styled-b=
y-prettify"><br></span><span style=3D"color: #660;" class=3D"styled-by-pret=
tify">{</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br=
>&nbsp; &nbsp; foo</span><span style=3D"color: #660;" class=3D"styled-by-pr=
ettify">(</span><font color=3D"#006666"><span style=3D"color: #066;" class=
=3D"styled-by-prettify">50.0</span><span style=3D"color: #660;" class=3D"st=
yled-by-prettify">%</span></font><span style=3D"color: #660;" class=3D"styl=
ed-by-prettify">,</span><span style=3D"color: #000;" class=3D"styled-by-pre=
ttify"> </span><font color=3D"#006666"><span style=3D"color: #066;" class=
=3D"styled-by-prettify">100.0</span><span style=3D"color: #660;" class=3D"s=
tyled-by-prettify">%</span></font><span style=3D"color: #660;" class=3D"sty=
led-by-prettify">);</span><span style=3D"color: #000;" class=3D"styled-by-p=
rettify"><br>&nbsp; &nbsp; </span><span style=3D"color: #008;" class=3D"sty=
led-by-prettify">return</span><span style=3D"color: #000;" class=3D"styled-=
by-prettify"> </span><span style=3D"color: #066;" class=3D"styled-by-pretti=
fy">0</span><span style=3D"color: #660;" class=3D"styled-by-prettify">;</sp=
an><span style=3D"color: #000;" class=3D"styled-by-prettify"><br></span><sp=
an style=3D"color: #660;" class=3D"styled-by-prettify">}</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"><br></span><span style=3D"co=
lor: #800;" class=3D"styled-by-prettify">/*<br></span><div style=3D"color: =
rgb(34, 34, 34); font-family: Arial, Helvetica, sans-serif; background-colo=
r: rgb(255, 255, 255);"><span style=3D"color: #800;" class=3D"styled-by-pre=
ttify">Output:<br></span></div><div style=3D"color: rgb(34, 34, 34); font-f=
amily: Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);"=
><div><span style=3D"color: #800;" class=3D"styled-by-prettify">0.5</span><=
/div><div><span style=3D"color: #800;" class=3D"styled-by-prettify">1</span=
></div></div><span style=3D"color: #800;" class=3D"styled-by-prettify">*/</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br><br></sp=
an></div></code></div><div><br></div></div><div>Not terribly complicated an=
d not really too important, but it would certainly make some things much ea=
sier and more beautiful. &nbsp;This shouldn't affect older code since the m=
odulo operator is currently forbidden on floating-point types and causes a =
compiler error when used with float, double and long double.</div><div><br>=
</div></div>

<p></p>

-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_272_1188127921.1411980453253--

.


Author: Douglas Boffey <douglas.boffey@gmail.com>
Date: Mon, 29 Sep 2014 05:04:28 -0700 (PDT)
Raw View
------=_Part_353_1714157933.1411992268474
Content-Type: text/plain; charset=UTF-8

So, should

 a % - b


be parsed as (a %) - b or a % (-b)?

Note, a and b could be user-defined objects.

--

---
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_353_1714157933.1411992268474
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><DIV>So, should</DIV><CODE class=3Dprettyprint>
<DIV>
<DIV style=3D"BORDER-BOTTOM: #bbb 1px solid; BORDER-LEFT: #bbb 1px solid; B=
ACKGROUND-COLOR: #fafafa; WORD-WRAP: break-word; BORDER-TOP: #bbb 1px solid=
; BORDER-RIGHT: #bbb 1px solid" class=3Dprettyprint>
<DIV class=3Dsubprettyprint><SPAN style=3D"COLOR: #000" class=3Dstyled-by-p=
rettify>&nbsp;&nbsp;<BR></SPAN></DIV></CODE></DIV></DIV>
<DIV style=3D"BORDER-BOTTOM: #bbb 1px solid; BORDER-LEFT: #bbb 1px solid; B=
ACKGROUND-COLOR: #fafafa; WORD-WRAP: break-word; BORDER-TOP: #bbb 1px solid=
; BORDER-RIGHT: #bbb 1px solid" class=3Dprettyprint><CODE class=3Dprettypri=
nt>
<DIV class=3Dsubprettyprint><SPAN style=3D"COLOR: #000" class=3Dstyled-by-p=
rettify>a </SPAN><SPAN style=3D"COLOR: #660" class=3Dstyled-by-prettify>%</=
SPAN><SPAN style=3D"COLOR: #000" class=3Dstyled-by-prettify> </SPAN><SPAN s=
tyle=3D"COLOR: #660" class=3Dstyled-by-prettify>-</SPAN><SPAN style=3D"COLO=
R: #000" class=3Dstyled-by-prettify> b</SPAN></DIV></CODE></DIV><BR>
<DIV>&nbsp;</DIV>
<DIV>be parsed as (a %) - b or a % (-b)?</DIV>
<DIV>&nbsp;</DIV>
<DIV>Note, a and b could be user-defined objects.</DIV></div>

<p></p>

-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_353_1714157933.1411992268474--

.


Author: David Krauss <potswa@gmail.com>
Date: Mon, 29 Sep 2014 23:04:45 +0800
Raw View
--Apple-Mail=_3E597604-67D8-4E6A-9A97-0F189F7DCE9A
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=UTF-8


On 2014=E2=80=9309=E2=80=9329, at 4:47 PM, ron novy <rsn10100@gmail.com> wr=
ote:

>     foo(50.0%, 100.0%);

Try this:

#define =EF=B9=AA /100.

or this:

constexpr long double operator "" _=EF=B9=AA ( long double x )
    { return x / 100; }

(That=E2=80=99s a Unicode SMALL PERCENT SIGN. I=E2=80=99m not 100=EF=B9=AA =
serious.)

--=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=_3E597604-67D8-4E6A-9A97-0F189F7DCE9A
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;"><br><div><div>On 2014=E2=80=
=9309=E2=80=9329, at 4:47 PM, ron novy &lt;<a href=3D"mailto:rsn10100@gmail=
..com">rsn10100@gmail.com</a>&gt; wrote:</div><br class=3D"Apple-interchange=
-newline"><blockquote type=3D"cite"><span class=3D"styled-by-prettify" styl=
e=3D"font-family: monospace; font-size: 12px; font-style: normal; font-vari=
ant: normal; font-weight: normal; letter-spacing: normal; line-height: norm=
al; orphans: auto; text-align: start; text-indent: 0px; text-transform: non=
e; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-strok=
e-width: 0px; background-color: rgb(250, 250, 250);">&nbsp; &nbsp; foo</spa=
n><span class=3D"styled-by-prettify" style=3D"font-family: monospace; font-=
size: 12px; font-style: normal; font-variant: normal; font-weight: normal; =
letter-spacing: normal; line-height: normal; orphans: auto; text-align: sta=
rt; text-indent: 0px; text-transform: none; white-space: normal; widows: au=
to; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rg=
b(250, 250, 250); color: rgb(102, 102, 0);">(</span><font color=3D"#006666"=
 style=3D"font-family: monospace; 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-=
stroke-width: 0px; background-color: rgb(250, 250, 250);"><span class=3D"st=
yled-by-prettify" style=3D"color: rgb(0, 102, 102);">50.0</span><span class=
=3D"styled-by-prettify" style=3D"color: rgb(102, 102, 0);">%</span></font><=
span class=3D"styled-by-prettify" style=3D"font-family: monospace; font-siz=
e: 12px; font-style: normal; font-variant: normal; font-weight: normal; let=
ter-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; background-color: rgb(2=
50, 250, 250); color: rgb(102, 102, 0);">,</span><span class=3D"styled-by-p=
rettify" style=3D"font-family: monospace; font-size: 12px; font-style: norm=
al; font-variant: normal; font-weight: normal; letter-spacing: normal; line=
-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-t=
ransform: none; white-space: normal; widows: auto; word-spacing: 0px; -webk=
it-text-stroke-width: 0px; background-color: rgb(250, 250, 250);"><span cla=
ss=3D"Apple-converted-space">&nbsp;</span></span><font color=3D"#006666" st=
yle=3D"font-family: monospace; font-size: 12px; font-style: normal; font-va=
riant: normal; font-weight: normal; letter-spacing: normal; line-height: no=
rmal; orphans: auto; text-align: start; text-indent: 0px; text-transform: n=
one; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-str=
oke-width: 0px; background-color: rgb(250, 250, 250);"><span class=3D"style=
d-by-prettify" style=3D"color: rgb(0, 102, 102);">100.0</span><span class=
=3D"styled-by-prettify" style=3D"color: rgb(102, 102, 0);">%</span></font><=
span class=3D"styled-by-prettify" style=3D"font-family: monospace; font-siz=
e: 12px; font-style: normal; font-variant: normal; font-weight: normal; let=
ter-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; background-color: rgb(2=
50, 250, 250); color: rgb(102, 102, 0);">);</span><span class=3D"styled-by-=
prettify" style=3D"font-family: monospace; font-size: 12px; font-style: nor=
mal; font-variant: normal; font-weight: normal; letter-spacing: normal; lin=
e-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-=
transform: none; white-space: normal; widows: auto; word-spacing: 0px; -web=
kit-text-stroke-width: 0px; background-color: rgb(250, 250, 250);"><br></sp=
an></blockquote></div><br><div>Try this:</div><div><br></div><div><font fac=
e=3D"Courier">#define&nbsp;</font><span style=3D"font-family: Courier;">=EF=
=B9=AA</span><font face=3D"Courier">&nbsp;/100.</font></div><div><br></div>=
<div>or this:</div><div><br></div><div><font face=3D"Courier">constexpr lon=
g double operator "" _=EF=B9=AA ( long double x )</font></div><div><font fa=
ce=3D"Courier">&nbsp; &nbsp; { return x / 100; }</font></div><div><br></div=
><div>(That=E2=80=99s a Unicode SMALL PERCENT SIGN. I=E2=80=99m not 100<spa=
n style=3D"font-family: Courier;">=EF=B9=AA</span>&nbsp;serious.)</div><div=
><br></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&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

--Apple-Mail=_3E597604-67D8-4E6A-9A97-0F189F7DCE9A--

.


Author: Zhihao Yuan <zy@miator.net>
Date: Mon, 29 Sep 2014 11:37:17 -0400
Raw View
--001a11333a4caa595a0504360af3
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Mon, Sep 29, 2014 at 11:04 AM, David Krauss <potswa@gmail.com> wrote:

>
> constexpr long double operator "" _=EF=B9=AA ( long double x )
>     { return x / 100; }
>

Hmm, not accepted by clang 3.4.2, but probably a bug.

2_percent, 200_permille might be enough; the small variants look
not so attractive to me.


--=20
Zhihao Yuan, ID lichray
The best way to predict the future is to invent it.
___________________________________________________
4BSD -- http://bit.ly/blog4bsd

--=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/.

--001a11333a4caa595a0504360af3
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Mon, Sep 29, 2014 at 11:04 AM, David Krauss <span dir=
=3D"ltr">&lt;<a href=3D"mailto:potswa@gmail.com" target=3D"_blank">potswa@g=
mail.com</a>&gt;</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;b=
order-left:1px #ccc solid;padding-left:1ex"><div style=3D"word-wrap:break-w=
ord"><br><div><font face=3D"Courier">constexpr long double operator &quot;&=
quot; _=EF=B9=AA ( long double x )</font></div><div><font face=3D"Courier">=
=C2=A0 =C2=A0 { return x / 100; }</font></div></div></blockquote></div><br>=
</div><div class=3D"gmail_extra">Hmm, not accepted by clang 3.4.2, but prob=
ably a bug.<br><br></div><div class=3D"gmail_extra">2_percent, 200_permille=
 might be enough; the small variants look<br></div><div class=3D"gmail_extr=
a">not so attractive to me.<br></div><div class=3D"gmail_extra"><br clear=
=3D"all"></div><div class=3D"gmail_extra"><br>-- <br>Zhihao Yuan, ID lichra=
y<br>The best way to predict the future is to invent it.<br>_______________=
____________________________________<br>4BSD -- <a href=3D"http://bit.ly/bl=
og4bsd" target=3D"_blank">http://bit.ly/blog4bsd</a>
</div></div>

<p></p>

-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

--001a11333a4caa595a0504360af3--

.


Author: ron novy <rsn10100@gmail.com>
Date: Mon, 29 Sep 2014 12:43:50 -0700 (PDT)
Raw View
------=_Part_579_2014578833.1412019830755
Content-Type: text/plain; charset=UTF-8

On Monday, September 29, 2014 5:04:28 AM UTC-7, Douglas Boffey wrote:
>
> So, should
>
>  a % - b
>
>
> be parsed as (a %) - b or a % (-b)?
>
> Note, a and b could be user-defined objects.
>

I see your point.  It would need to be done first as (a%) - b and It would
need to only work on literals.  So it would need be a literal operator.

I think the only way to ensure it works properly named as '%' is to have it
as a built-in literal operator.  So perhaps a built-in literal operator can
be defined?
long double operator "" %(long double);

I have created a _pct literal operator but it just isn't as elegant a
solution.
#include <iostream>
using namespace std;

long double operator "" _pct(long double x) { return x / 100.0; };

int main()
{
    cout << "Testing percentage literal operator..." << endl;
    double x = 79.0_pct - 10.0_pct;
//  double x = 79.0% - 10.0%;  <- Just looks 100% better ;)
    cout << x << endl;
    cout << endl;
    return 0;
}



--

---
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_579_2014578833.1412019830755
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Monday, September 29, 2014 5:04:28 AM UTC-7, Douglas Bo=
ffey 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"><d=
iv>So, should</div><code>
<div>
<div style=3D"BORDER-BOTTOM:#bbb 1px solid;BORDER-LEFT:#bbb 1px solid;BACKG=
ROUND-COLOR:#fafafa;WORD-WRAP:break-word;BORDER-TOP:#bbb 1px solid;BORDER-R=
IGHT:#bbb 1px solid">
<div><span style=3D"COLOR:#000">&nbsp;&nbsp;<br></span></div></div></div></=
code></div>
<div style=3D"BORDER-BOTTOM:#bbb 1px solid;BORDER-LEFT:#bbb 1px solid;BACKG=
ROUND-COLOR:#fafafa;WORD-WRAP:break-word;BORDER-TOP:#bbb 1px solid;BORDER-R=
IGHT:#bbb 1px solid"><code>
<div><span style=3D"COLOR:#000">a </span><span style=3D"COLOR:#660">%</span=
><span style=3D"COLOR:#000"> </span><span style=3D"COLOR:#660">-</span><spa=
n style=3D"COLOR:#000"> b</span></div></code></div><br>
<div>&nbsp;</div>
<div>be parsed as (a %) - b or a % (-b)?</div>
<div>&nbsp;</div>
<div>Note, a and b could be user-defined objects.</div></blockquote><div><b=
r></div>I see your point. &nbsp;It would need to be done first as (a%) - b =
and It would need to only work on literals. &nbsp;So it would need be a lit=
eral operator.<div><br></div><div>I think the only way to ensure it works p=
roperly named as '%' is to have it as a built-in literal operator. &nbsp;So=
 perhaps a built-in literal operator can be defined?</div><div><div class=
=3D"prettyprint" style=3D"border: 1px solid rgb(187, 187, 187); word-wrap: =
break-word; background-color: rgb(250, 250, 250);"><code class=3D"prettypri=
nt"><div class=3D"subprettyprint"><span style=3D"color: #008;" class=3D"sty=
led-by-prettify">long</span><span style=3D"color: #000;" class=3D"styled-by=
-prettify"> </span><span style=3D"color: #008;" class=3D"styled-by-prettify=
">double</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> <=
/span><span style=3D"color: #008;" class=3D"styled-by-prettify">operator</s=
pan><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"> </span><span style=3D"color=
: #660;" class=3D"styled-by-prettify">%(</span><span style=3D"color: #008;"=
 class=3D"styled-by-prettify">long</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=3D"style=
d-by-prettify">double</span><span style=3D"color: #660;" class=3D"styled-by=
-prettify">);</span></div></code></div></div><div><br></div><div>I have cre=
ated a _pct literal operator but it just isn't as elegant a solution.</div>=
<div class=3D"prettyprint" style=3D"border: 1px solid rgb(187, 187, 187); w=
ord-wrap: break-word; background-color: rgb(250, 250, 250);"><code class=3D=
"prettyprint"><div class=3D"subprettyprint"><span style=3D"color: #800;" cl=
ass=3D"styled-by-prettify">#include</span><span style=3D"color: #000;" clas=
s=3D"styled-by-prettify"> </span><span style=3D"color: #080;" class=3D"styl=
ed-by-prettify">&lt;iostream&gt;</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"><br></span><span style=3D"color: #008;" class=3D"st=
yled-by-prettify">using</span><span style=3D"color: #000;" class=3D"styled-=
by-prettify"> </span><span style=3D"color: #008;" class=3D"styled-by-pretti=
fy">namespace</span><span style=3D"color: #000;" class=3D"styled-by-prettif=
y"> std</span><span style=3D"color: #660;" class=3D"styled-by-prettify">;</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br><br></sp=
an><span style=3D"color: #008;" class=3D"styled-by-prettify">long</span><sp=
an style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=
=3D"color: #008;" class=3D"styled-by-prettify">double</span><span style=3D"=
color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #0=
08;" 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"styl=
ed-by-prettify"> _pct</span><span style=3D"color: #660;" class=3D"styled-by=
-prettify">(</span><span style=3D"color: #008;" class=3D"styled-by-prettify=
">long</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </s=
pan><span style=3D"color: #008;" class=3D"styled-by-prettify">double</span>=
<span style=3D"color: #000;" class=3D"styled-by-prettify"> x</span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify">)</span><span style=3D"co=
lor: #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"> </span><span style=3D"color: #008;" class=3D"style=
d-by-prettify">return</span><span style=3D"color: #000;" class=3D"styled-by=
-prettify"> x </span><span style=3D"color: #660;" class=3D"styled-by-pretti=
fy">/</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </sp=
an><span style=3D"color: #066;" class=3D"styled-by-prettify">100.0</span><s=
pan style=3D"color: #660;" class=3D"styled-by-prettify">;</span><span 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><br></span><span style=3D"color: #008;" c=
lass=3D"styled-by-prettify">int</span><span style=3D"color: #000;" class=3D=
"styled-by-prettify"> main</span><span style=3D"color: #660;" class=3D"styl=
ed-by-prettify">()</span><span style=3D"color: #000;" class=3D"styled-by-pr=
ettify"><br></span><span style=3D"color: #660;" class=3D"styled-by-prettify=
">{</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>&nb=
sp; &nbsp; cout </span><span style=3D"color: #660;" class=3D"styled-by-pret=
tify">&lt;&lt;</span><span style=3D"color: #000;" class=3D"styled-by-pretti=
fy"> </span><span style=3D"color: #080;" class=3D"styled-by-prettify">"Test=
ing percentage literal operator..."</span><span style=3D"color: #000;" clas=
s=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"styl=
ed-by-prettify">&lt;&lt;</span><span style=3D"color: #000;" class=3D"styled=
-by-prettify"> endl</span><span style=3D"color: #660;" class=3D"styled-by-p=
rettify">;</span><span style=3D"color: #000;" class=3D"styled-by-prettify">=
<br>&nbsp; &nbsp; </span><span style=3D"color: #008;" class=3D"styled-by-pr=
ettify">double</span><span style=3D"color: #000;" class=3D"styled-by-pretti=
fy"> x </span><span style=3D"color: #660;" class=3D"styled-by-prettify">=3D=
</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><s=
pan style=3D"color: #066;" class=3D"styled-by-prettify">79.0</span><span st=
yle=3D"color: #000;" class=3D"styled-by-prettify">_pct </span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">-</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #066;" =
class=3D"styled-by-prettify">10.0</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify">_pct</span><span style=3D"color: #660;" class=3D"st=
yled-by-prettify">;</span><span style=3D"color: #000;" class=3D"styled-by-p=
rettify"><br></span><span style=3D"color: #800;" class=3D"styled-by-prettif=
y">// &nbsp;double x =3D 79.0% - 10.0%; &nbsp;&lt;- Just looks 100% better =
;)</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>&nbs=
p; &nbsp; cout </span><span style=3D"color: #660;" class=3D"styled-by-prett=
ify">&lt;&lt;</span><span style=3D"color: #000;" class=3D"styled-by-prettif=
y"> x </span><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;=
&lt;</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> endl<=
/span><span style=3D"color: #660;" class=3D"styled-by-prettify">;</span><sp=
an style=3D"color: #000;" class=3D"styled-by-prettify"><br>&nbsp; &nbsp; co=
ut </span><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;&lt=
;</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> endl</sp=
an><span style=3D"color: #660;" class=3D"styled-by-prettify">;</span><span =
style=3D"color: #000;" class=3D"styled-by-prettify"><br>&nbsp; &nbsp; </spa=
n><span style=3D"color: #008;" class=3D"styled-by-prettify">return</span><s=
pan style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=
=3D"color: #066;" class=3D"styled-by-prettify">0</span><span style=3D"color=
: #660;" class=3D"styled-by-prettify">;</span><span style=3D"color: #000;" =
class=3D"styled-by-prettify"><br></span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">}</span><span style=3D"color: #000;" class=3D"style=
d-by-prettify"><br><br></span></div></code></div><div><br><br></div></div>

<p></p>

-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_579_2014578833.1412019830755--

.


Author: Richard Smith <richard@metafoo.co.uk>
Date: Mon, 29 Sep 2014 12:55:50 -0700
Raw View
--047d7b3a7e3055bda3050439a77b
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Mon, Sep 29, 2014 at 8:37 AM, Zhihao Yuan <zy@miator.net> wrote:

> On Mon, Sep 29, 2014 at 11:04 AM, David Krauss <potswa@gmail.com> wrote:
>
>>
>> constexpr long double operator "" _=EF=B9=AA ( long double x )
>>     { return x / 100; }
>>
>
> Hmm, not accepted by clang 3.4.2, but probably a bug.
>

Works fine in Clang 3.5.


> 2_percent, 200_permille might be enough; the small variants look
> not so attractive to me.
>
>
> --
> Zhihao Yuan, ID lichray
> The best way to predict the future is to invent it.
> ___________________________________________________
> 4BSD -- http://bit.ly/blog4bsd
>
> --
>
> ---
> 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/.
>

--=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/.

--047d7b3a7e3055bda3050439a77b
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On M=
on, Sep 29, 2014 at 8:37 AM, Zhihao Yuan <span dir=3D"ltr">&lt;<a href=3D"m=
ailto:zy@miator.net" target=3D"_blank">zy@miator.net</a>&gt;</span> wrote:<=
br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left=
:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><span class=3D"">On Mon,=
 Sep 29, 2014 at 11:04 AM, David Krauss <span dir=3D"ltr">&lt;<a href=3D"ma=
ilto:potswa@gmail.com" target=3D"_blank">potswa@gmail.com</a>&gt;</span> wr=
ote:<br><div class=3D"gmail_extra"><div class=3D"gmail_quote"><blockquote c=
lass=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;=
padding-left:1ex"><div style=3D"word-wrap:break-word"><br><div><font face=
=3D"Courier">constexpr long double operator &quot;&quot; _=EF=B9=AA ( long =
double x )</font></div><div><font face=3D"Courier">=C2=A0 =C2=A0 { return x=
 / 100; }</font></div></div></blockquote></div><br></div></span><div class=
=3D"gmail_extra">Hmm, not accepted by clang 3.4.2, but probably a bug.<br><=
/div></div></blockquote><div><br></div><div>Works fine in Clang 3.5.</div><=
div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8e=
x;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div class=
=3D"gmail_extra"></div><div class=3D"gmail_extra">2_percent, 200_permille m=
ight be enough; the small variants look<br></div><div class=3D"gmail_extra"=
>not so attractive to me.<span class=3D"HOEnZb"><font color=3D"#888888"><br=
></font></span></div><span class=3D"HOEnZb"><font color=3D"#888888"><div cl=
ass=3D"gmail_extra"><br clear=3D"all"></div><div class=3D"gmail_extra"><br>=
-- <br>Zhihao Yuan, ID lichray<br>The best way to predict the future is to =
invent it.<br>___________________________________________________<br>4BSD -=
- <a href=3D"http://bit.ly/blog4bsd" target=3D"_blank">http://bit.ly/blog4b=
sd</a>
</div></font></span></div><div class=3D"HOEnZb"><div class=3D"h5">

<p></p>

-- <br>
<br>
--- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org" target=3D"_=
blank">std-proposals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/" target=3D"_blank">http://groups.google.com/a/isocpp.org/gro=
up/std-proposals/</a>.<br>
</div></div></blockquote></div><br></div></div>

<p></p>

-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

--047d7b3a7e3055bda3050439a77b--

.


Author: ron novy <rsn10100@gmail.com>
Date: Mon, 29 Sep 2014 17:30:28 -0700 (PDT)
Raw View
------=_Part_3955_1301406988.1412037028232
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable



On Monday, September 29, 2014 12:55:51 PM UTC-7, Richard Smith wrote:
>
> On Mon, Sep 29, 2014 at 8:37 AM, Zhihao Yuan <z...@miator.net=20
> <javascript:>> wrote:
>
>> On Mon, Sep 29, 2014 at 11:04 AM, David Krauss <pot...@gmail.com=20
>> <javascript:>> wrote:
>>
>>>
>>> constexpr long double operator "" _=EF=B9=AA ( long double x )
>>>     { return x / 100; }
>>>
>>
>> Hmm, not accepted by clang 3.4.2, but probably a bug.
>>
>
> Works fine in Clang 3.5.
>

Not on Windows :P=20

--=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_3955_1301406988.1412037028232
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>On Monday, September 29, 2014 12:55:51 PM UTC-7, R=
ichard Smith wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;mar=
gin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D=
"ltr"><div><div class=3D"gmail_quote">On Mon, Sep 29, 2014 at 8:37 AM, Zhih=
ao Yuan <span dir=3D"ltr">&lt;<a href=3D"javascript:" target=3D"_blank" gdf=
-obfuscated-mailto=3D"v9AwUloADwQJ" onmousedown=3D"this.href=3D'javascript:=
';return true;" onclick=3D"this.href=3D'javascript:';return true;">z...@mia=
tor.net</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D=
"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D=
"ltr"><span>On Mon, Sep 29, 2014 at 11:04 AM, David Krauss <span dir=3D"ltr=
">&lt;<a href=3D"javascript:" target=3D"_blank" gdf-obfuscated-mailto=3D"v9=
AwUloADwQJ" onmousedown=3D"this.href=3D'javascript:';return true;" onclick=
=3D"this.href=3D'javascript:';return true;">pot...@gmail.com</a>&gt;</span>=
 wrote:<br><div><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 style=3D"word-wrap:break-word"><br><div><font face=3D"Courier">constexp=
r long double operator "" _=EF=B9=AA ( long double x )</font></div><div><fo=
nt face=3D"Courier">&nbsp; &nbsp; { return x / 100; }</font></div></div></b=
lockquote></div><br></div></span><div>Hmm, not accepted by clang 3.4.2, but=
 probably a bug.<br></div></div></blockquote><div><br></div><div>Works fine=
 in Clang 3.5.</div></div></div></div></blockquote><div><br></div><div>Not =
on Windows :P&nbsp;</div></div>

<p></p>

-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_3955_1301406988.1412037028232--

.


Author: Richard Smith <richard@metafoo.co.uk>
Date: Mon, 29 Sep 2014 17:53:52 -0700
Raw View
--089e014933922ca37005043dd171
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Mon, Sep 29, 2014 at 5:30 PM, ron novy <rsn10100@gmail.com> wrote:

>
>
> On Monday, September 29, 2014 12:55:51 PM UTC-7, Richard Smith wrote:
>>
>> On Mon, Sep 29, 2014 at 8:37 AM, Zhihao Yuan <z...@miator.net> wrote:
>>
>>> On Mon, Sep 29, 2014 at 11:04 AM, David Krauss <pot...@gmail.com> wrote=
:
>>>
>>>>
>>>> constexpr long double operator "" _=EF=B9=AA ( long double x )
>>>>     { return x / 100; }
>>>>
>>>
>>> Hmm, not accepted by clang 3.4.2, but probably a bug.
>>>
>>
>> Works fine in Clang 3.5.
>>
>
> Not on Windows :P
>

Yay, encoding issues. Please file a bug! =3D) (Sorry, this is the last
off-topic message from me on this segue.)

--=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/.

--089e014933922ca37005043dd171
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On M=
on, Sep 29, 2014 at 5:30 PM, ron novy <span dir=3D"ltr">&lt;<a href=3D"mail=
to:rsn10100@gmail.com" target=3D"_blank">rsn10100@gmail.com</a>&gt;</span> =
wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;bord=
er-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><br><br>On Monday=
, September 29, 2014 12:55:51 PM UTC-7, Richard Smith wrote:<blockquote cla=
ss=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc=
 solid;padding-left:1ex"><div dir=3D"ltr"><div><div class=3D"gmail_quote">O=
n Mon, Sep 29, 2014 at 8:37 AM, Zhihao Yuan <span dir=3D"ltr">&lt;<a>z...@m=
iator.net</a>&gt;</span> wrote:<span class=3D""><br><blockquote class=3D"gm=
ail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-le=
ft:1ex"><div dir=3D"ltr"><span>On Mon, Sep 29, 2014 at 11:04 AM, David Krau=
ss <span dir=3D"ltr">&lt;<a>pot...@gmail.com</a>&gt;</span> wrote:<br><div>=
<div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"margi=
n:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style=3D"wor=
d-wrap:break-word"><br><div><font face=3D"Courier">constexpr long double op=
erator &quot;&quot; _=EF=B9=AA ( long double x )</font></div><div><font fac=
e=3D"Courier">=C2=A0 =C2=A0 { return x / 100; }</font></div></div></blockqu=
ote></div><br></div></span><div>Hmm, not accepted by clang 3.4.2, but proba=
bly a bug.<br></div></div></blockquote><div><br></div><div>Works fine in Cl=
ang 3.5.</div></span></div></div></div></blockquote><div><br></div><div>Not=
 on Windows :P=C2=A0</div></div></blockquote><div><br></div><div>Yay, encod=
ing issues. Please file a bug! =3D) (Sorry, this is the last off-topic mess=
age from me on this segue.)=C2=A0</div></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&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

--089e014933922ca37005043dd171--

.