Topic: overloading by constexpr (round 2?)


Author: "dgutson ." <danielgutson@gmail.com>
Date: Mon, 6 Mar 2017 15:15:51 -0300
Raw View
--94eb2c047d42bd2b8b054a13e246
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

I'm proposing the ability to provide two versions of a function, overloaded
by the constexpr specifier: one constexpr version and another non-constexpr
version, and let the compiler use the appropriate one according to the
context.

A slightly similar subject has been discussed before (
https://groups.google.com/a/isocpp.org/d/topic/std-proposals/oxijwTY-ft4/di=
scussion
).
Additionally, people seems to be interested in detecting constexpr-ness
(e.g.
http://stackoverflow.com/questions/15232758/detecting-constexpr-with-sfinae=
)
to achieve the same "manually".

I'm talking about to make this simpler:

constexpr int f()
{
    return 1;
}

int f()
{
    return 2;
}

constexpr auto a =3D f();    // a =3D 1
auto fun =3D std::function<int(void)>(f);
int b =3D fun();   // b =3D 2

If there is some interest, I can star working in a gcc fork as a prototype.

BRgds,

    Daniel.


--=20
Who=E2=80=99s got the sweetest disposition?
One guess, that=E2=80=99s who?
Who=E2=80=99d never, ever start an argument?
Who never shows a bit of temperament?
Who's never wrong but always right?
Who'd never dream of starting a fight?
Who get stuck with all the bad luck?

--=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.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/CAFdMc-2q3KpV%2Bm5cfWr6b02XmHVUdxsNCNAVFG%2BmzCv=
0QY7ZRg%40mail.gmail.com.

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

<div dir=3D"ltr"><div><div>I&#39;m proposing the ability to provide two ver=
sions of a function,=20
overloaded by the constexpr specifier: one constexpr version and another
 non-constexpr version, and let the compiler use the appropriate one=20
according to the context.<br></div><div><br></div>A slightly similar subjec=
t has been discussed before (<a href=3D"https://groups.google.com/a/isocpp.=
org/d/topic/std-proposals/oxijwTY-ft4/discussion">https://groups.google.com=
/a/isocpp.org/d/topic/std-proposals/oxijwTY-ft4/discussion</a> ).<br></div>=
<div>Additionally, people seems to be interested in detecting constexpr-nes=
s (e.g. <a href=3D"http://stackoverflow.com/questions/15232758/detecting-co=
nstexpr-with-sfinae">http://stackoverflow.com/questions/15232758/detecting-=
constexpr-with-sfinae</a>) to achieve the same &quot;manually&quot;.<br><br=
></div><div>I&#39;m talking about to make this simpler:<br></div><br><div>c=
onstexpr int f()<br>{<br></div><div>=C2=A0=C2=A0=C2=A0 return 1;<br></div><=
div>}<br><br></div><div>int f()<br>{<br></div><div>=C2=A0=C2=A0=C2=A0 retur=
n 2;<br></div><div>}<br><br></div><div>constexpr auto a =3D f();=C2=A0=C2=
=A0=C2=A0 // a =3D 1<br></div><div>auto fun =3D std::function&lt;int(void)&=
gt;(f);<br></div><div>int b =3D fun();=C2=A0=C2=A0 // b =3D 2<br><br></div>=
<div><div>If there is some interest, I can star working in a gcc fork as a =
prototype.<br><br></div><div>BRgds,<br><br></div><div>=C2=A0=C2=A0=C2=A0 Da=
niel.<br><br><br></div><div>-- <br><div class=3D"gmail_signature">Who=E2=80=
=99s got the sweetest disposition?<br>One guess, that=E2=80=99s who?<br>Who=
=E2=80=99d never, ever start an argument?<br>Who never shows a bit of tempe=
rament?<br>Who&#39;s never wrong but always right?<br>Who&#39;d never dream=
 of starting a fight?<br>Who get stuck with all the bad luck? </div>
</div></div><br></div>

<p></p>

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

--94eb2c047d42bd2b8b054a13e246--

.


Author: Richard Smith <richard@metafoo.co.uk>
Date: Mon, 6 Mar 2017 13:30:10 -0800
Raw View
--001a11471460d53e2e054a169a4c
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

You might want to get in touch with the author of
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0595r0.html (which
was discussed in Evolution last week and seems to have had a favourable
reception).

On 6 March 2017 at 10:15, dgutson . <danielgutson@gmail.com> wrote:

> I'm proposing the ability to provide two versions of a function,
> overloaded by the constexpr specifier: one constexpr version and another
> non-constexpr version, and let the compiler use the appropriate one
> according to the context.
>
> A slightly similar subject has been discussed before (
> https://groups.google.com/a/isocpp.org/d/topic/std-proposals/oxijwTY-ft4/
> discussion ).
> Additionally, people seems to be interested in detecting constexpr-ness
> (e.g. http://stackoverflow.com/questions/15232758/detecting-
> constexpr-with-sfinae) to achieve the same "manually".
>
> I'm talking about to make this simpler:
>
> constexpr int f()
> {
>     return 1;
> }
>
> int f()
> {
>     return 2;
> }
>
> constexpr auto a =3D f();    // a =3D 1
> auto fun =3D std::function<int(void)>(f);
> int b =3D fun();   // b =3D 2
>
> If there is some interest, I can star working in a gcc fork as a prototyp=
e.
>
> BRgds,
>
>     Daniel.
>
>
> --
> Who=E2=80=99s got the sweetest disposition?
> One guess, that=E2=80=99s who?
> Who=E2=80=99d never, ever start an argument?
> Who never shows a bit of temperament?
> Who's never wrong but always right?
> Who'd never dream of starting a fight?
> Who get stuck with all the bad luck?
>
> --
> 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/CAFdMc-2q3KpV%
> 2Bm5cfWr6b02XmHVUdxsNCNAVFG%2BmzCv0QY7ZRg%40mail.gmail.com
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAFdMc-2q3K=
pV%2Bm5cfWr6b02XmHVUdxsNCNAVFG%2BmzCv0QY7ZRg%40mail.gmail.com?utm_medium=3D=
email&utm_source=3Dfooter>
> .
>

--=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.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/CAOfiQqm4VgaS8OSeopB88dE68CNYRubwZa5H0f2F0rn6FsO=
WXw%40mail.gmail.com.

--001a11471460d53e2e054a169a4c
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">You =
might want to get in touch with the author of <a href=3D"http://www.open-st=
d.org/jtc1/sc22/wg21/docs/papers/2017/p0595r0.html">http://www.open-std.org=
/jtc1/sc22/wg21/docs/papers/2017/p0595r0.html</a> (which was discussed in E=
volution last week and seems to have had a favourable reception).</div><div=
 class=3D"gmail_quote"><br></div><div class=3D"gmail_quote">On 6 March 2017=
 at 10:15, dgutson . <span dir=3D"ltr">&lt;<a href=3D"mailto:danielgutson@g=
mail.com" target=3D"_blank">danielgutson@gmail.com</a>&gt;</span> wrote:<br=
><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border=
-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr"><div><d=
iv>I&#39;m proposing the ability to provide two versions of a function,=20
overloaded by the constexpr specifier: one constexpr version and another
 non-constexpr version, and let the compiler use the appropriate one=20
according to the context.<br></div><div><br></div>A slightly similar subjec=
t has been discussed before (<a href=3D"https://groups.google.com/a/isocpp.=
org/d/topic/std-proposals/oxijwTY-ft4/discussion" target=3D"_blank">https:/=
/groups.google.com/a/<wbr>isocpp.org/d/topic/std-<wbr>proposals/oxijwTY-ft4=
/<wbr>discussion</a> ).<br></div><div>Additionally, people seems to be inte=
rested in detecting constexpr-ness (e.g. <a href=3D"http://stackoverflow.co=
m/questions/15232758/detecting-constexpr-with-sfinae" target=3D"_blank">htt=
p://stackoverflow.com/<wbr>questions/15232758/detecting-<wbr>constexpr-with=
-sfinae</a>) to achieve the same &quot;manually&quot;.<br><br></div><div>I&=
#39;m talking about to make this simpler:<br></div><br><div>constexpr int f=
()<br>{<br></div><div>=C2=A0=C2=A0=C2=A0 return 1;<br></div><div>}<br><br><=
/div><div>int f()<br>{<br></div><div>=C2=A0=C2=A0=C2=A0 return 2;<br></div>=
<div>}<br><br></div><div>constexpr auto a =3D f();=C2=A0=C2=A0=C2=A0 // a =
=3D 1<br></div><div>auto fun =3D std::function&lt;int(void)&gt;(f);<br></di=
v><div>int b =3D fun();=C2=A0=C2=A0 // b =3D 2<br><br></div><div><div>If th=
ere is some interest, I can star working in a gcc fork as a prototype.<br><=
br></div><div>BRgds,<br><br></div><div>=C2=A0=C2=A0=C2=A0 Daniel.<span clas=
s=3D"gmail-HOEnZb"><font color=3D"#888888"><br><br><br></font></span></div>=
<span class=3D"gmail-HOEnZb"><font color=3D"#888888"><div>-- <br><div class=
=3D"gmail-m_-298111473399651679gmail_signature">Who=E2=80=99s got the sweet=
est disposition?<br>One guess, that=E2=80=99s who?<br>Who=E2=80=99d never, =
ever start an argument?<br>Who never shows a bit of temperament?<br>Who&#39=
;s never wrong but always right?<br>Who&#39;d never dream of starting a fig=
ht?<br>Who get stuck with all the bad luck? </div>
</div></font></span></div><span class=3D"gmail-HOEnZb"><font color=3D"#8888=
88"><br></font></span></div><span class=3D"gmail-HOEnZb"><font color=3D"#88=
8888">

<p></p>

-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org" target=3D"_=
blank">std-proposals+unsubscribe@<wbr>isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CAFdMc-2q3KpV%2Bm5cfWr6b02XmHVUdxsNCN=
AVFG%2BmzCv0QY7ZRg%40mail.gmail.com?utm_medium=3Demail&amp;utm_source=3Dfoo=
ter" target=3D"_blank">https://groups.google.com/a/<wbr>isocpp.org/d/msgid/=
std-<wbr>proposals/CAFdMc-2q3KpV%<wbr>2Bm5cfWr6b02XmHVUdxsNCNAVFG%<wbr>2Bmz=
Cv0QY7ZRg%40mail.gmail.com</a><wbr>.<br>
</font></span></blockquote></div><br></div></div>

<p></p>

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

--001a11471460d53e2e054a169a4c--

.


Author: Erich Keane <erich.keane@verizon.net>
Date: Mon, 6 Mar 2017 15:16:53 -0800 (PST)
Raw View
------=_Part_659_1802273394.1488842213842
Content-Type: multipart/alternative;
 boundary="----=_Part_660_2000997385.1488842213843"

------=_Part_660_2000997385.1488842213843
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

We also approved "do constexpr" functions which Daveed also presented=20
(constexpr ONLY functions). =20

    do constexpr void f(){...} // Function can only be called at=20
compiletime, error otherwise.

The idea of overloading based on constexpr'ness of a function came up in=20
the break, and a number of people mentioned there were some significant=20
issues with it, and it seemed that 'if (constexpr())' (though with a=20
different, pseudo-library function spelling) had significantly more=20
consensus.

On Monday, March 6, 2017 at 1:30:33 PM UTC-8, Richard Smith wrote:
>
> You might want to get in touch with the author of=20
> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0595r0.html=20
> (which was discussed in Evolution last week and seems to have had a=20
> favourable reception).
>
> On 6 March 2017 at 10:15, dgutson . <daniel...@gmail.com <javascript:>>=
=20
> wrote:
>
>> I'm proposing the ability to provide two versions of a function,=20
>> overloaded by the constexpr specifier: one constexpr version and another=
=20
>> non-constexpr version, and let the compiler use the appropriate one=20
>> according to the context.
>>
>> A slightly similar subject has been discussed before (
>> https://groups.google.com/a/isocpp.org/d/topic/std-proposals/oxijwTY-ft4=
/discussion=20
>> ).
>> Additionally, people seems to be interested in detecting constexpr-ness=
=20
>> (e.g.=20
>> http://stackoverflow.com/questions/15232758/detecting-constexpr-with-sfi=
nae)=20
>> to achieve the same "manually".
>>
>> I'm talking about to make this simpler:
>>
>> constexpr int f()
>> {
>>     return 1;
>> }
>>
>> int f()
>> {
>>     return 2;
>> }
>>
>> constexpr auto a =3D f();    // a =3D 1
>> auto fun =3D std::function<int(void)>(f);
>> int b =3D fun();   // b =3D 2
>>
>> If there is some interest, I can star working in a gcc fork as a=20
>> prototype.
>>
>> BRgds,
>>
>>     Daniel.
>>
>>
>> --=20
>> Who=E2=80=99s got the sweetest disposition?
>> One guess, that=E2=80=99s who?
>> Who=E2=80=99d never, ever start an argument?
>> Who never shows a bit of temperament?
>> Who's never wrong but always right?
>> Who'd never dream of starting a fight?
>> Who get stuck with all the bad luck?=20
>>
>> --=20
>> You received this message because you are subscribed to the Google Group=
s=20
>> "ISO C++ Standard - Future Proposals" group.
>> To unsubscribe from this group and stop receiving emails from it, send a=
n=20
>> email to std-proposal...@isocpp.org <javascript:>.
>> To post to this group, send email to std-pr...@isocpp.org <javascript:>.
>> To view this discussion on the web visit=20
>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAFdMc-2q3K=
pV%2Bm5cfWr6b02XmHVUdxsNCNAVFG%2BmzCv0QY7ZRg%40mail.gmail.com=20
>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAFdMc-2q3=
KpV%2Bm5cfWr6b02XmHVUdxsNCNAVFG%2BmzCv0QY7ZRg%40mail.gmail.com?utm_medium=
=3Demail&utm_source=3Dfooter>
>> .
>>
>
>

--=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.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/a0f4db51-ab03-4173-979e-52613b9577a2%40isocpp.or=
g.

------=_Part_660_2000997385.1488842213843
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">We also approved &quot;do constexpr&quot; functions which =
Daveed also presented (constexpr ONLY functions).=C2=A0 <br><br>=C2=A0=C2=
=A0=C2=A0 do constexpr void f(){...} // Function can only be called at comp=
iletime, error otherwise.<br><br>The idea of overloading based on constexpr=
&#39;ness of a function came up in the break, and a number of people mentio=
ned there were some significant issues with it, and it seemed that &#39;if =
(constexpr())&#39; (though with a different, pseudo-library function spelli=
ng) had significantly more consensus.<br><br>On Monday, March 6, 2017 at 1:=
30:33 PM UTC-8, Richard Smith 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"><div><div class=3D"gmail_quote">You might want to ge=
t in touch with the author of <a href=3D"http://www.open-std.org/jtc1/sc22/=
wg21/docs/papers/2017/p0595r0.html" target=3D"_blank" rel=3D"nofollow" onmo=
usedown=3D"this.href=3D&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww=
..open-std.org%2Fjtc1%2Fsc22%2Fwg21%2Fdocs%2Fpapers%2F2017%2Fp0595r0.html\x2=
6sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGBy7-98sVjjKijxZd31_aHZmR0AQ&#39;;ret=
urn true;" onclick=3D"this.href=3D&#39;http://www.google.com/url?q\x3dhttp%=
3A%2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%2Fwg21%2Fdocs%2Fpapers%2F2017%2Fp059=
5r0.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGBy7-98sVjjKijxZd31_aHZmR0=
AQ&#39;;return true;">http://www.open-std.org/jtc1/<wbr>sc22/wg21/docs/pape=
rs/2017/<wbr>p0595r0.html</a> (which was discussed in Evolution last week a=
nd seems to have had a favourable reception).</div><div class=3D"gmail_quot=
e"><br></div><div class=3D"gmail_quote">On 6 March 2017 at 10:15, dgutson .=
 <span dir=3D"ltr">&lt;<a href=3D"javascript:" target=3D"_blank" gdf-obfusc=
ated-mailto=3D"eVVUes9PCwAJ" rel=3D"nofollow" onmousedown=3D"this.href=3D&#=
39;javascript:&#39;;return true;" onclick=3D"this.href=3D&#39;javascript:&#=
39;;return true;">daniel...@gmail.com</a>&gt;</span> wrote:<br><blockquote =
class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px sol=
id rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr"><div><div>I&#39;m pr=
oposing the ability to provide two versions of a function,=20
overloaded by the constexpr specifier: one constexpr version and another
 non-constexpr version, and let the compiler use the appropriate one=20
according to the context.<br></div><div><br></div>A slightly similar subjec=
t has been discussed before (<a href=3D"https://groups.google.com/a/isocpp.=
org/d/topic/std-proposals/oxijwTY-ft4/discussion" target=3D"_blank" rel=3D"=
nofollow" onmousedown=3D"this.href=3D&#39;https://groups.google.com/a/isocp=
p.org/d/topic/std-proposals/oxijwTY-ft4/discussion&#39;;return true;" oncli=
ck=3D"this.href=3D&#39;https://groups.google.com/a/isocpp.org/d/topic/std-p=
roposals/oxijwTY-ft4/discussion&#39;;return true;">https://groups.google.co=
m/a/<wbr>isocpp.org/d/topic/std-<wbr>proposals/oxijwTY-ft4/<wbr>discussion<=
/a> ).<br></div><div>Additionally, people seems to be interested in detecti=
ng constexpr-ness (e.g. <a href=3D"http://stackoverflow.com/questions/15232=
758/detecting-constexpr-with-sfinae" target=3D"_blank" rel=3D"nofollow" onm=
ousedown=3D"this.href=3D&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fst=
ackoverflow.com%2Fquestions%2F15232758%2Fdetecting-constexpr-with-sfinae\x2=
6sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGPo3AX-xJYFXlFCYzAupI6x3DTKQ&#39;;ret=
urn true;" onclick=3D"this.href=3D&#39;http://www.google.com/url?q\x3dhttp%=
3A%2F%2Fstackoverflow.com%2Fquestions%2F15232758%2Fdetecting-constexpr-with=
-sfinae\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGPo3AX-xJYFXlFCYzAupI6x3DTK=
Q&#39;;return true;">http://stackoverflow.com/<wbr>questions/15232758/detec=
ting-<wbr>constexpr-with-sfinae</a>) to achieve the same &quot;manually&quo=
t;.<br><br></div><div>I&#39;m talking about to make this simpler:<br></div>=
<br><div>constexpr int f()<br>{<br></div><div>=C2=A0=C2=A0=C2=A0 return 1;<=
br></div><div>}<br><br></div><div>int f()<br>{<br></div><div>=C2=A0=C2=A0=
=C2=A0 return 2;<br></div><div>}<br><br></div><div>constexpr auto a =3D f()=
;=C2=A0=C2=A0=C2=A0 // a =3D 1<br></div><div>auto fun =3D std::function&lt;=
int(void)&gt;(f);<br></div><div>int b =3D fun();=C2=A0=C2=A0 // b =3D 2<br>=
<br></div><div><div>If there is some interest, I can star working in a gcc =
fork as a prototype.<br><br></div><div>BRgds,<br><br></div><div>=C2=A0=C2=
=A0=C2=A0 Daniel.<span><font color=3D"#888888"><br><br><br></font></span></=
div><span><font color=3D"#888888"><div>-- <br><div>Who=E2=80=99s got the sw=
eetest disposition?<br>One guess, that=E2=80=99s who?<br>Who=E2=80=99d neve=
r, ever start an argument?<br>Who never shows a bit of temperament?<br>Who&=
#39;s never wrong but always right?<br>Who&#39;d never dream of starting a =
fight?<br>Who get stuck with all the bad luck? </div>
</div></font></span></div><span><font color=3D"#888888"><br></font></span><=
/div><span><font color=3D"#888888">

<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"javascript:" target=3D"_blank" gdf-obfuscated-mailto=3D"=
eVVUes9PCwAJ" rel=3D"nofollow" onmousedown=3D"this.href=3D&#39;javascript:&=
#39;;return true;" onclick=3D"this.href=3D&#39;javascript:&#39;;return true=
;">std-proposal...@<wbr>isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"javascript:" target=3D"_bla=
nk" gdf-obfuscated-mailto=3D"eVVUes9PCwAJ" rel=3D"nofollow" onmousedown=3D"=
this.href=3D&#39;javascript:&#39;;return true;" onclick=3D"this.href=3D&#39=
;javascript:&#39;;return true;">std-pr...@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/CAFdMc-2q3KpV%2Bm5cfWr6b02XmHVUdxsNCN=
AVFG%2BmzCv0QY7ZRg%40mail.gmail.com?utm_medium=3Demail&amp;utm_source=3Dfoo=
ter" target=3D"_blank" rel=3D"nofollow" onmousedown=3D"this.href=3D&#39;htt=
ps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAFdMc-2q3KpV%2Bm=
5cfWr6b02XmHVUdxsNCNAVFG%2BmzCv0QY7ZRg%40mail.gmail.com?utm_medium\x3demail=
\x26utm_source\x3dfooter&#39;;return true;" onclick=3D"this.href=3D&#39;htt=
ps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAFdMc-2q3KpV%2Bm=
5cfWr6b02XmHVUdxsNCNAVFG%2BmzCv0QY7ZRg%40mail.gmail.com?utm_medium\x3demail=
\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/a/<wb=
r>isocpp.org/d/msgid/std-<wbr>proposals/CAFdMc-2q3KpV%<wbr>2Bm5cfWr6b02XmHV=
UdxsNCNAVFG%<wbr>2BmzCv0QY7ZRg%40mail.gmail.com</a><wbr>.<br>
</font></span></blockquote></div><br></div></div>
</blockquote></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/a0f4db51-ab03-4173-979e-52613b9577a2%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/a0f4db51-ab03-4173-979e-52613b9577a2=
%40isocpp.org</a>.<br />

------=_Part_660_2000997385.1488842213843--

------=_Part_659_1802273394.1488842213842--

.


Author: Thiago Macieira <thiago@macieira.org>
Date: Tue, 07 Mar 2017 00:47:27 +0100
Raw View
Em segunda-feira, 6 de mar=C3=A7o de 2017, =C3=A0s 22:30:10 CET, Richard Sm=
ith escreveu:
> You might want to get in touch with the author of
> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0595r0.html (whi=
ch
> was discussed in Evolution last week and seems to have had a favourable
> reception).

Thanks, that's good to know.

Daniel, it might still be interesting to have overload-by-constexpr, in=20
addition to the constexpr() operator. The use-case is exactly the one I gav=
e=20
in my email: the ability to add constexprness to a function you can't=20
otherwise touch (like strlen).

--=20
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center

--=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.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/1766257.z69F6uvxnS%40tjmaciei-mobl1.

.


Author: Nicol Bolas <jmckesson@gmail.com>
Date: Mon, 6 Mar 2017 16:06:47 -0800 (PST)
Raw View
------=_Part_1784_2131559936.1488845207613
Content-Type: multipart/alternative;
 boundary="----=_Part_1785_681420884.1488845207613"

------=_Part_1785_681420884.1488845207613
Content-Type: text/plain; charset=UTF-8

On Monday, March 6, 2017 at 6:16:54 PM UTC-5, Erich Keane wrote:
>
> We also approved "do constexpr" functions which Daveed also presented
> (constexpr ONLY functions).
>

Was that proposal in the mailing? I don't recall seeing it. And seriously,
nobody objected to "do constexpr" for the induction syntax ;)


>
>     do constexpr void f(){...} // Function can only be called at
> compiletime, error otherwise.
>
> The idea of overloading based on constexpr'ness of a function came up in
> the break, and a number of people mentioned there were some significant
> issues with it, and it seemed that 'if (constexpr())' (though with a
> different, pseudo-library function spelling) had significantly more
> consensus.
>

Hey, either way; so long as we get what we need.

That being said, even with the tools in place, I think it's a bad idea to
take C standard library functions and give them C++ features like this. It
would be much better for us to add C++ versions of these functions; that
way, we can give them whatever C++ features we feel are warranted.

While the `char_traits` version might be longer to write than `strlen`/etc,
I think it's a good idea to get C++ programmers used to C++ programming,
not C-with-stuff programming. And by making people have to use the C++
function to get C++ features (like constexpr) is a good way to encourage
people to relearn old idioms.

The C parts of the C++ standard library should be thought of as "for
compatibility only". The future should be the C++ parts of the C++ standard
library.

--
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/e7ecf684-a495-41ad-838a-50599c6cddca%40isocpp.org.

------=_Part_1785_681420884.1488845207613
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Monday, March 6, 2017 at 6:16:54 PM UTC-5, Erich Keane =
wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8=
ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr">We also=
 approved &quot;do constexpr&quot; functions which Daveed also presented (c=
onstexpr ONLY functions).<br></div></blockquote><div><br>Was that proposal =
in the mailing? I don&#39;t recall seeing it. And seriously, nobody objecte=
d to &quot;do constexpr&quot; for the induction syntax ;)<br>=C2=A0</div><b=
lockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;borde=
r-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr"><br>=C2=A0=C2=
=A0=C2=A0 do constexpr void f(){...} // Function can only be called at comp=
iletime, error otherwise.<br><br>The idea of overloading based on constexpr=
&#39;ness of a function came up in the break, and a number of people mentio=
ned there were some significant issues with it, and it seemed that &#39;if =
(constexpr())&#39; (though with a different, pseudo-library function spelli=
ng) had significantly more consensus.</div></blockquote><div><br>Hey, eithe=
r way; so long as we get what we need.<br><br>That being said, even with th=
e tools in place, I think it&#39;s a bad idea to take C standard library fu=
nctions and give them C++ features like this. It would be much better for u=
s to add C++ versions of these functions; that way, we can give them whatev=
er C++ features we feel are warranted.<br><br>While the `char_traits` versi=
on might be longer to write than `strlen`/etc, I think it&#39;s a good idea=
 to get C++ programmers used to C++ programming, not C-with-stuff programmi=
ng. And by making people have to use the C++ function to get C++ features (=
like constexpr) is a good way to encourage people to relearn old idioms.<br=
><br>The C parts of the C++ standard library should be thought of as &quot;=
for=20
compatibility only&quot;. The future should be the C++ parts of the C++=20
standard library.<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/e7ecf684-a495-41ad-838a-50599c6cddca%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/e7ecf684-a495-41ad-838a-50599c6cddca=
%40isocpp.org</a>.<br />

------=_Part_1785_681420884.1488845207613--

------=_Part_1784_2131559936.1488845207613--

.


Author: Thiago Macieira <thiago@macieira.org>
Date: Tue, 07 Mar 2017 15:18:26 +0100
Raw View
Em ter=C3=A7a-feira, 7 de mar=C3=A7o de 2017, =C3=A0s 01:06:47 CET, Nicol B=
olas escreveu:
> That being said, even with the tools in place, I think it's a bad idea to
> take C standard library functions and give them C++ features like this. I=
t
> would be much better for us to add C++ versions of these functions; that
> way, we can give them whatever C++ features we feel are warranted.

std::strlen is a C++ function; ::strlen is the C function.

Compare std::abs nd std::fabs vs ::abs and ::fabs.

> While the `char_traits` version might be longer to write than `strlen`/et=
c,
> I think it's a good idea to get C++ programmers used to C++ programming,
> not C-with-stuff programming. And by making people have to use the C++
> function to get C++ features (like constexpr) is a good way to encourage
> people to relearn old idioms.

I don't like having to learn a new function, since strlen is so widespread =
and=20
known.

But if we go for a new function, then it can't be std::char_traits because =
the=20
next token after "char_traits" needs to be the < to indicate what type I wa=
nt=20
to use. We need a free function to do type detection.

> The C parts of the C++ standard library should be thought of as "for
> compatibility only". The future should be the C++ parts of the C++ standa=
rd
> library.

I disagree, but can't fault your thinking.

--=20
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center

--=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.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/2141398.ZslfniALhC%40tjmaciei-mobl1.

.


Author: Jean-Marc Bourguet <jm.bourguet@gmail.com>
Date: Tue, 7 Mar 2017 07:04:46 -0800 (PST)
Raw View
------=_Part_2155_1823086820.1488899087010
Content-Type: multipart/alternative;
 boundary="----=_Part_2156_1207161964.1488899087010"

------=_Part_2156_1207161964.1488899087010
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Le mardi 7 mars 2017 15:18:41 UTC+1, Thiago Macieira a =C3=A9crit :
>
> Em ter=C3=A7a-feira, 7 de mar=C3=A7o de 2017, =C3=A0s 01:06:47 CET, Nicol=
 Bolas escreveu:=20
> > That being said, even with the tools in place, I think it's a bad idea=
=20
> to=20
> > take C standard library functions and give them C++ features like this.=
=20
> It=20
> > would be much better for us to add C++ versions of these functions; tha=
t=20
> > way, we can give them whatever C++ features we feel are warranted.=20
>
> std::strlen is a C++ function; ::strlen is the C function.=20
>

AFAIK std::strlen and ::strlen designate the same function (See [headers/4]=
=20
and=20
[depr.c.headers/4]).

Yours,

--=20
Jean-Marc

--=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.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/c7359391-244f-4643-8bc3-b521f2462426%40isocpp.or=
g.

------=_Part_2156_1207161964.1488899087010
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Le mardi 7 mars 2017 15:18:41 UTC+1, Thiago Macieira a =C3=
=A9crit=C2=A0:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-l=
eft: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">Em ter=C3=A7a-fe=
ira, 7 de mar=C3=A7o de 2017, =C3=A0s 01:06:47 CET, Nicol Bolas escreveu:
<br>&gt; That being said, even with the tools in place, I think it&#39;s a =
bad idea to
<br>&gt; take C standard library functions and give them C++ features like =
this. It
<br>&gt; would be much better for us to add C++ versions of these functions=
; that
<br>&gt; way, we can give them whatever C++ features we feel are warranted.
<br>
<br>std::strlen is a C++ function; ::strlen is the C function.
<br></blockquote><div><br></div><div>AFAIK std::strlen and ::strlen designa=
te the same function (See [headers/4] and=C2=A0</div><div>[depr.c.headers/4=
]).</div><div><br></div><div>Yours,</div><div><br></div><div>--=C2=A0</div>=
<div>Jean-Marc</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/c7359391-244f-4643-8bc3-b521f2462426%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/c7359391-244f-4643-8bc3-b521f2462426=
%40isocpp.org</a>.<br />

------=_Part_2156_1207161964.1488899087010--

------=_Part_2155_1823086820.1488899087010--

.


Author: Dan Raviv <dan.raviv@gmail.com>
Date: Tue, 7 Mar 2017 10:01:01 -0800 (PST)
Raw View
------=_Part_891_2045239084.1488909661211
Content-Type: multipart/alternative;
 boundary="----=_Part_892_959834260.1488909661212"

------=_Part_892_959834260.1488909661212
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

+1
It would remove one roadblock to making basic STL math/algorithm functions=
=20
constexpr, since one argument against it is that a non-constexpr=20
implementation might allow for better runtime (when these functions indeed=
=20
run at runtime).

On Monday, March 6, 2017 at 8:15:54 PM UTC+2, dgutson wrote:
>
> I'm proposing the ability to provide two versions of a function,=20
> overloaded by the constexpr specifier: one constexpr version and another=
=20
> non-constexpr version, and let the compiler use the appropriate one=20
> according to the context.
>
> A slightly similar subject has been discussed before (
> https://groups.google.com/a/isocpp.org/d/topic/std-proposals/oxijwTY-ft4/=
discussion=20
> ).
> Additionally, people seems to be interested in detecting constexpr-ness=
=20
> (e.g.=20
> http://stackoverflow.com/questions/15232758/detecting-constexpr-with-sfin=
ae)=20
> to achieve the same "manually".
>
> I'm talking about to make this simpler:
>
> constexpr int f()
> {
>     return 1;
> }
>
> int f()
> {
>     return 2;
> }
>
> constexpr auto a =3D f();    // a =3D 1
> auto fun =3D std::function<int(void)>(f);
> int b =3D fun();   // b =3D 2
>
> If there is some interest, I can star working in a gcc fork as a prototyp=
e.
>
> BRgds,
>
>     Daniel.
>
>
> --=20
> Who=E2=80=99s got the sweetest disposition?
> One guess, that=E2=80=99s who?
> Who=E2=80=99d never, ever start an argument?
> Who never shows a bit of temperament?
> Who's never wrong but always right?
> Who'd never dream of starting a fight?
> Who get stuck with all the bad luck?=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.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/26e2c972-3c64-4f62-a856-e7490621958e%40isocpp.or=
g.

------=_Part_892_959834260.1488909661212
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">+1<div>It would remove one roadblock to making basic STL m=
ath/algorithm functions constexpr, since one argument against it is that a =
non-constexpr implementation might allow for better runtime (when these fun=
ctions indeed run at runtime).</div><div><br>On Monday, March 6, 2017 at 8:=
15:54 PM UTC+2, dgutson wrote:<blockquote class=3D"gmail_quote" style=3D"ma=
rgin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">=
<div dir=3D"ltr"><div><div>I&#39;m proposing the ability to provide two ver=
sions of a function,=20
overloaded by the constexpr specifier: one constexpr version and another
 non-constexpr version, and let the compiler use the appropriate one=20
according to the context.<br></div><div><br></div>A slightly similar subjec=
t has been discussed before (<a href=3D"https://groups.google.com/a/isocpp.=
org/d/topic/std-proposals/oxijwTY-ft4/discussion" target=3D"_blank" rel=3D"=
nofollow" onmousedown=3D"this.href=3D&#39;https://groups.google.com/a/isocp=
p.org/d/topic/std-proposals/oxijwTY-ft4/discussion&#39;;return true;" oncli=
ck=3D"this.href=3D&#39;https://groups.google.com/a/isocpp.org/d/topic/std-p=
roposals/oxijwTY-ft4/discussion&#39;;return true;">https://groups.google.co=
m/a/<wbr>isocpp.org/d/topic/std-<wbr>proposals/oxijwTY-ft4/<wbr>discussion<=
/a> ).<br></div><div>Additionally, people seems to be interested in detecti=
ng constexpr-ness (e.g. <a href=3D"http://stackoverflow.com/questions/15232=
758/detecting-constexpr-with-sfinae" target=3D"_blank" rel=3D"nofollow" onm=
ousedown=3D"this.href=3D&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fst=
ackoverflow.com%2Fquestions%2F15232758%2Fdetecting-constexpr-with-sfinae\x2=
6sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGPo3AX-xJYFXlFCYzAupI6x3DTKQ&#39;;ret=
urn true;" onclick=3D"this.href=3D&#39;http://www.google.com/url?q\x3dhttp%=
3A%2F%2Fstackoverflow.com%2Fquestions%2F15232758%2Fdetecting-constexpr-with=
-sfinae\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGPo3AX-xJYFXlFCYzAupI6x3DTK=
Q&#39;;return true;">http://stackoverflow.com/<wbr>questions/15232758/detec=
ting-<wbr>constexpr-with-sfinae</a>) to achieve the same &quot;manually&quo=
t;.<br><br></div><div>I&#39;m talking about to make this simpler:<br></div>=
<br><div>constexpr int f()<br>{<br></div><div>=C2=A0=C2=A0=C2=A0 return 1;<=
br></div><div>}<br><br></div><div>int f()<br>{<br></div><div>=C2=A0=C2=A0=
=C2=A0 return 2;<br></div><div>}<br><br></div><div>constexpr auto a =3D f()=
;=C2=A0=C2=A0=C2=A0 // a =3D 1<br></div><div>auto fun =3D std::function&lt;=
int(void)&gt;(f);<br></div><div>int b =3D fun();=C2=A0=C2=A0 // b =3D 2<br>=
<br></div><div><div>If there is some interest, I can star working in a gcc =
fork as a prototype.<br><br></div><div>BRgds,<br><br></div><div>=C2=A0=C2=
=A0=C2=A0 Daniel.<br><br><br></div><div>-- <br><div>Who=E2=80=99s got the s=
weetest disposition?<br>One guess, that=E2=80=99s who?<br>Who=E2=80=99d nev=
er, ever start an argument?<br>Who never shows a bit of temperament?<br>Who=
&#39;s never wrong but always right?<br>Who&#39;d never dream of starting a=
 fight?<br>Who get stuck with all the bad luck? </div>
</div></div><br></div>
</blockquote></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/26e2c972-3c64-4f62-a856-e7490621958e%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/26e2c972-3c64-4f62-a856-e7490621958e=
%40isocpp.org</a>.<br />

------=_Part_892_959834260.1488909661212--

------=_Part_891_2045239084.1488909661211--

.


Author: Thiago Macieira <thiago@macieira.org>
Date: Tue, 07 Mar 2017 22:13:58 +0100
Raw View
Em ter=C3=A7a-feira, 7 de mar=C3=A7o de 2017, =C3=A0s 16:04:46 CET, Jean-Ma=
rc Bourguet=20
escreveu:
> AFAIK std::strlen and ::strlen designate the same function (See [headers/=
4]
> and
> [depr.c.headers/4]).

I know they do. My point is that we have a precedent for diverging from the=
 C=20
functions by adding overloads for what people will actually use.

std::abs is one such example. Another example of divergence is adding const=
 to=20
some other string functions and overloading them with the ones without cons=
t.

--=20
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center

--=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.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/8559627.YBS2pS8IRY%40tjmaciei-mobl1.

.


Author: Victor Dyachenko <victor.dyachenko@gmail.com>
Date: Wed, 8 Mar 2017 23:47:14 -0800 (PST)
Raw View
------=_Part_529_809652335.1489045634949
Content-Type: multipart/alternative;
 boundary="----=_Part_530_1966679896.1489045634949"

------=_Part_530_1966679896.1489045634949
Content-Type: text/plain; charset=UTF-8

There are some issues with overloading C functions. See
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33935 and linked ones.

--
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/f3a467c5-47b9-474d-a959-e1684f2bb51c%40isocpp.org.

------=_Part_530_1966679896.1489045634949
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">There are some issues with overloading C functions. See <a=
 href=3D"https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D33935">https://gcc.=
gnu.org/bugzilla/show_bug.cgi?id=3D33935</a> and linked ones.<br></div>

<p></p>

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

------=_Part_530_1966679896.1489045634949--

------=_Part_529_809652335.1489045634949--

.


Author: Thiago Macieira <thiago@macieira.org>
Date: Thu, 09 Mar 2017 09:12:01 +0100
Raw View
Em quinta-feira, 9 de mar=C3=A7o de 2017, =C3=A0s 08:47:14 CET, Victor Dyac=
henko=20
escreveu:
> There are some issues with overloading C functions. See
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D33935 and linked ones.

Thankfully, whatever has worked for strchr can work for strlen.

--=20
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center

--=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.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/5119609.bFGLR9HZ7f%40tjmaciei-mobl1.

.


Author: Matthew Woehlke <mwoehlke.floss@gmail.com>
Date: Fri, 10 Mar 2017 11:52:56 -0500
Raw View
(@Erich; Please don't top-post.)

On 2017-03-06 19:06, Nicol Bolas wrote:
> On 2017-03-06 18:16, Erich Keane wrote:
>> On Monday, March 6, 2017 at 1:30:33 PM UTC-8, Richard Smith wrote:
>>> You might want to get in touch with the author of
>>> http://wg21.link/p0595 (which was discussed in Evolution last week
>>> and seems to have had a favourable reception).

The reception was favorable, yes, but there were some objections to the
exact syntax. Looking back at the wiki notes, I'm not sure what the
final direction there was, besides that we clearly want this sort of
thing in some form.

>> We also approved "do constexpr" functions which Daveed also presented
>> (constexpr ONLY functions).
>
> Was that proposal in the mailing? I don't recall seeing it. And seriously,
> nobody objected to "do constexpr" for the induction syntax ;)

It's not in the paper as published in the mailing; IIRC it was a late
addition. And, no, the syntax was not approved; only the concept.

--
Matthew

--
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/58C2D9E8.5050808%40gmail.com.

.