Topic: replace constexpr on functions with pure to indicate


Author: ojcraftter@gmail.com
Date: Tue, 26 Jun 2018 22:42:19 -0700 (PDT)
Raw View
------=_Part_47156_119367309.1530078139031
Content-Type: multipart/alternative;
 boundary="----=_Part_47157_1158701371.1530078139032"

------=_Part_47157_1158701371.1530078139032
Content-Type: text/plain; charset="UTF-8"


int fib(int n) pure
{

    int a{ 0 };
    int b{ 1 };
    while (n-- > 1)
    {
        const int t{ a };
        a = b;
        b += t;
    }
    return b;}



--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/04c505a2-27ff-47bf-8678-2f4f2906415b%40isocpp.org.

------=_Part_47157_1158701371.1530078139032
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><div class=3D"prettyprint" 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 class=3D"prettyprint"><di=
v class=3D"subprettyprint"><span style=3D"color: #000;" class=3D"styled-by-=
prettify"><br></span><span style=3D"color: #008;" class=3D"styled-by-pretti=
fy">int</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> fi=
b</span><span style=3D"color: #660;" class=3D"styled-by-prettify">(</span><=
span style=3D"color: #008;" class=3D"styled-by-prettify">int</span><span st=
yle=3D"color: #000;" class=3D"styled-by-prettify"> n</span><span style=3D"c=
olor: #660;" class=3D"styled-by-prettify">)</span><span style=3D"color: #00=
0;" class=3D"styled-by-prettify"> pure<br></span><span style=3D"color: #660=
;" class=3D"styled-by-prettify">{</span></div></code><pre class=3D"lang-c p=
rettyprint prettyprinted" style=3D"margin-bottom: 1em; padding: 5px; font-v=
ariant-numeric: inherit; font-variant-east-asian: inherit; font-stretch: in=
herit; line-height: inherit; font-family: Consolas, Menlo, Monaco, &quot;Lu=
cida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quo=
t;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospac=
e, sans-serif; vertical-align: baseline; box-sizing: inherit; width: auto; =
max-height: 600px; overflow: auto; background-color: rgb(239, 240, 241); co=
lor: rgb(57, 51, 24); word-wrap: normal;"><code style=3D"font-style: inheri=
t; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line=
-height: inherit; font-family: Consolas, Menlo, Monaco, &quot;Lucida Consol=
e&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;B=
itstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace, sans-ser=
if; vertical-align: baseline; box-sizing: inherit; white-space: inherit;"><=
span class=3D"pln" style=3D"font-style: inherit; font-variant: inherit; fon=
t-weight: inherit; font-stretch: inherit; line-height: inherit; font-family=
: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51=
, 54);">    </span><span class=3D"typ" style=3D"font-style: inherit; font-v=
ariant: inherit; font-weight: inherit; font-stretch: inherit; line-height: =
inherit; font-family: inherit; vertical-align: baseline; box-sizing: inheri=
t; color: rgb(43, 145, 175);">int</span><span class=3D"pln" style=3D"font-s=
tyle: inherit; font-variant: inherit; font-weight: inherit; font-stretch: i=
nherit; line-height: inherit; font-family: inherit; vertical-align: baselin=
e; box-sizing: inherit; color: rgb(48, 51, 54);"> a{ </span><span class=3D"=
lit" style=3D"font-style: inherit; font-variant: inherit; font-weight: inhe=
rit; font-stretch: inherit; line-height: inherit; font-family: inherit; ver=
tical-align: baseline; box-sizing: inherit; color: rgb(125, 39, 39);">0 }</=
span><span class=3D"pun" style=3D"font-style: inherit; font-variant: inheri=
t; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-=
family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(=
48, 51, 54);">;</span><span class=3D"pln" style=3D"font-style: inherit; fon=
t-variant: inherit; font-weight: inherit; font-stretch: inherit; line-heigh=
t: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inh=
erit; color: rgb(48, 51, 54);">
    </span><span class=3D"typ" style=3D"font-style: inherit; font-variant: =
inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit;=
 font-family: inherit; vertical-align: baseline; box-sizing: inherit; color=
: rgb(43, 145, 175);">int</span><span class=3D"pln" style=3D"font-style: in=
herit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; =
line-height: inherit; font-family: inherit; vertical-align: baseline; box-s=
izing: inherit; color: rgb(48, 51, 54);"> b{</span><span class=3D"pln" styl=
e=3D"font-style: inherit; font-variant: inherit; font-weight: inherit; font=
-stretch: inherit; line-height: inherit; font-family: inherit; vertical-ali=
gn: baseline; box-sizing: inherit; color: rgb(48, 51, 54);"> </span><span c=
lass=3D"lit" style=3D"font-style: inherit; font-variant: inherit; font-weig=
ht: inherit; font-stretch: inherit; line-height: inherit; font-family: inhe=
rit; vertical-align: baseline; box-sizing: inherit; color: rgb(125, 39, 39)=
;">1 }</span><span class=3D"pun" style=3D"font-style: inherit; font-variant=
: inherit; font-weight: inherit; font-stretch: inherit; line-height: inheri=
t; font-family: inherit; vertical-align: baseline; box-sizing: inherit; col=
or: rgb(48, 51, 54);">;</span><span class=3D"pln" style=3D"font-style: inhe=
rit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; li=
ne-height: inherit; font-family: inherit; vertical-align: baseline; box-siz=
ing: inherit; color: rgb(48, 51, 54);">
    </span><span class=3D"kwd" style=3D"font-style: inherit; font-variant: =
inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit;=
 font-family: inherit; vertical-align: baseline; box-sizing: inherit; color=
: rgb(16, 16, 148);">while</span><span class=3D"pln" style=3D"font-style: i=
nherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit;=
 line-height: inherit; font-family: inherit; vertical-align: baseline; box-=
sizing: inherit; color: rgb(48, 51, 54);"> </span><span class=3D"pun" style=
=3D"font-style: inherit; font-variant: inherit; font-weight: inherit; font-=
stretch: inherit; line-height: inherit; font-family: inherit; vertical-alig=
n: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">(</span><span cl=
ass=3D"pln" style=3D"font-style: inherit; font-variant: inherit; font-weigh=
t: inherit; font-stretch: inherit; line-height: inherit; font-family: inher=
it; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);"=
>n</span><span class=3D"pun" style=3D"font-style: inherit; font-variant: in=
herit; font-weight: inherit; font-stretch: inherit; line-height: inherit; f=
ont-family: inherit; vertical-align: baseline; box-sizing: inherit; color: =
rgb(48, 51, 54);">--</span><span class=3D"pln" style=3D"font-style: inherit=
; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-=
height: inherit; font-family: inherit; vertical-align: baseline; box-sizing=
: inherit; color: rgb(48, 51, 54);"> </span><span class=3D"pun" style=3D"fo=
nt-style: inherit; font-variant: inherit; font-weight: inherit; font-stretc=
h: inherit; line-height: inherit; font-family: inherit; vertical-align: bas=
eline; box-sizing: inherit; color: rgb(48, 51, 54);">&gt;</span><span class=
=3D"pln" style=3D"font-style: inherit; font-variant: inherit; font-weight: =
inherit; font-stretch: inherit; line-height: inherit; font-family: inherit;=
 vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);"> <=
/span><span class=3D"lit" style=3D"font-style: inherit; font-variant: inher=
it; font-weight: inherit; font-stretch: inherit; line-height: inherit; font=
-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb=
(125, 39, 39);">1</span><span class=3D"pun" style=3D"font-style: inherit; f=
ont-variant: inherit; font-weight: inherit; font-stretch: inherit; line-hei=
ght: inherit; font-family: inherit; vertical-align: baseline; box-sizing: i=
nherit; color: rgb(48, 51, 54);">)<br></span><span class=3D"pun" style=3D"f=
ont-style: inherit; font-variant: inherit; font-weight: inherit; font-stret=
ch: inherit; line-height: inherit; font-family: inherit; vertical-align: ba=
seline; box-sizing: inherit; color: rgb(48, 51, 54);">    {</span><span cla=
ss=3D"pln" style=3D"font-style: inherit; font-variant: inherit; font-weight=
: inherit; font-stretch: inherit; line-height: inherit; font-family: inheri=
t; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">
        const </span><span class=3D"typ" style=3D"font-style: inherit; font=
-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height=
: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inhe=
rit; color: rgb(43, 145, 175);">int</span><span class=3D"pln" style=3D"font=
-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch:=
 inherit; line-height: inherit; font-family: inherit; vertical-align: basel=
ine; box-sizing: inherit; color: rgb(48, 51, 54);"> t{ </span><span class=
=3D"pln" style=3D"font-style: inherit; font-variant: inherit; font-weight: =
inherit; font-stretch: inherit; line-height: inherit; font-family: inherit;=
 vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">a =
}</span><span class=3D"pun" style=3D"font-style: inherit; font-variant: inh=
erit; font-weight: inherit; font-stretch: inherit; line-height: inherit; fo=
nt-family: inherit; vertical-align: baseline; box-sizing: inherit; color: r=
gb(48, 51, 54);">;</span><span class=3D"pln" style=3D"font-style: inherit; =
font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-he=
ight: inherit; font-family: inherit; vertical-align: baseline; box-sizing: =
inherit; color: rgb(48, 51, 54);">
        a </span><span class=3D"pun" style=3D"font-style: inherit; font-var=
iant: inherit; font-weight: inherit; font-stretch: inherit; line-height: in=
herit; font-family: inherit; vertical-align: baseline; box-sizing: inherit;=
 color: rgb(48, 51, 54);">=3D</span><span class=3D"pln" style=3D"font-style=
: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inher=
it; line-height: inherit; font-family: inherit; vertical-align: baseline; b=
ox-sizing: inherit; color: rgb(48, 51, 54);"> b</span><span class=3D"pun" s=
tyle=3D"font-style: inherit; font-variant: inherit; font-weight: inherit; f=
ont-stretch: inherit; line-height: inherit; font-family: inherit; vertical-=
align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">;</span><spa=
n class=3D"pln" style=3D"font-style: inherit; font-variant: inherit; font-w=
eight: inherit; font-stretch: inherit; line-height: inherit; font-family: i=
nherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 5=
4);">
        b </span><span class=3D"pun" style=3D"font-style: inherit; font-var=
iant: inherit; font-weight: inherit; font-stretch: inherit; line-height: in=
herit; font-family: inherit; vertical-align: baseline; box-sizing: inherit;=
 color: rgb(48, 51, 54);">+=3D</span><span class=3D"pln" style=3D"font-styl=
e: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inhe=
rit; line-height: inherit; font-family: inherit; vertical-align: baseline; =
box-sizing: inherit; color: rgb(48, 51, 54);"> t</span><span class=3D"pun" =
style=3D"font-style: inherit; font-variant: inherit; font-weight: inherit; =
font-stretch: inherit; line-height: inherit; font-family: inherit; vertical=
-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">;</span><sp=
an class=3D"pln" style=3D"font-style: inherit; font-variant: inherit; font-=
weight: inherit; font-stretch: inherit; line-height: inherit; font-family: =
inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, =
54);">
    </span><span class=3D"pun" style=3D"font-style: inherit; font-variant: =
inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit;=
 font-family: inherit; vertical-align: baseline; box-sizing: inherit; color=
: rgb(48, 51, 54);">}</span><span class=3D"pln" style=3D"font-style: inheri=
t; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line=
-height: inherit; font-family: inherit; vertical-align: baseline; box-sizin=
g: inherit; color: rgb(48, 51, 54);">
    </span><span class=3D"kwd" style=3D"font-style: inherit; font-variant: =
inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit;=
 font-family: inherit; vertical-align: baseline; box-sizing: inherit; color=
: rgb(16, 16, 148);">return</span><span class=3D"pln" style=3D"font-style: =
inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit=
; line-height: inherit; font-family: inherit; vertical-align: baseline; box=
-sizing: inherit; color: rgb(48, 51, 54);"> b</span><span class=3D"pun" sty=
le=3D"font-style: inherit; font-variant: inherit; font-weight: inherit; fon=
t-stretch: inherit; line-height: inherit; font-family: inherit; vertical-al=
ign: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">;</span><span =
class=3D"pln" style=3D"font-style: inherit; font-variant: inherit; font-wei=
ght: inherit; font-stretch: inherit; line-height: inherit; font-family: inh=
erit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54)=
;">
</span><span class=3D"pun" style=3D"font-style: inherit; font-variant: inhe=
rit; font-weight: inherit; font-stretch: inherit; line-height: inherit; fon=
t-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rg=
b(48, 51, 54);">}</span></code></pre></div><br><br></div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/04c505a2-27ff-47bf-8678-2f4f2906415b%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/04c505a2-27ff-47bf-8678-2f4f2906415b=
%40isocpp.org</a>.<br />

------=_Part_47157_1158701371.1530078139032--

------=_Part_47156_119367309.1530078139031--

.