Topic: Are parameters of constexpr! functions necessarily
Author: Brian Bi <bbi5291@gmail.com>
Date: Sun, 4 Nov 2018 15:14:58 -0500
Raw View
--000000000000e42d410579dc6c85
Content-Type: text/plain; charset="UTF-8"
P1073R1 <http://wg21.link/p1073r1> introduces immediate functions:
functions declared with the constexpr! specifier, which forces all
invocations to be constant expressions. I wonder whether it might make
sense to allow the following type of code:
template <int> struct Foo {};
constexpr! void bar(int x) { Foo<x> foo; }
--
*Brian Bi*
--
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/CAMmfjbOT8toNhvzWc9NoCrb0G3DYOzc%2BRZ9yZZrd6jtJDs1G%3DQ%40mail.gmail.com.
--000000000000e42d410579dc6c85
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div><a href=3D"http://wg21.link/p1073r1">P1073R1</a> intr=
oduces immediate functions: functions declared with the <span style=3D"font=
-family:monospace,monospace">constexpr!</span> specifier, which forces all =
invocations to be constant expressions. I wonder whether it might make sens=
e to allow the following type of code:<span style=3D"font-family:monospace,=
monospace"></span><br></div><div><span style=3D"font-family:monospace,monos=
pace"></span><span style=3D"font-family:monospace,monospace"></span><br><sp=
an style=3D"font-family:monospace,monospace"></span><span style=3D"font-fam=
ily:monospace,monospace">template <int> struct Foo {};</span><span st=
yle=3D"font-family:monospace,monospace"></span><span style=3D"font-family:m=
onospace,monospace"><br>constexpr! void bar(int x) { Foo<x> foo; }</s=
pan></div><div><br></div><div>-- <br></div><div><div dir=3D"ltr" class=3D"g=
mail_signature" data-smartmail=3D"gmail_signature"><div dir=3D"ltr"><div><d=
iv dir=3D"ltr"><font color=3D"#c0c0c0"><i>Brian Bi</i></font><br><div></div=
><div></div><div></div></div></div></div></div></div></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CAMmfjbOT8toNhvzWc9NoCrb0G3DYOzc%2BRZ=
9yZZrd6jtJDs1G%3DQ%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter"=
>https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAMmfjbOT8toN=
hvzWc9NoCrb0G3DYOzc%2BRZ9yZZrd6jtJDs1G%3DQ%40mail.gmail.com</a>.<br />
--000000000000e42d410579dc6c85--
.