Topic: Concepts as "this" constraints
Author: jonkeinan@gmail.com
Date: Wed, 26 Sep 2018 12:29:48 -0700 (PDT)
Raw View
------=_Part_3008_437621199.1537990188320
Content-Type: multipart/alternative;
boundary="----=_Part_3009_361035436.1537990188320"
------=_Part_3009_361035436.1537990188320
Content-Type: text/plain; charset="UTF-8"
Hello,
I noticed the proposal to allow specifying && and & at the end of a member
function signature to apply a constraint on the this that is used.
The same can be said in regards to const specifier in member functions.
With the addition of concepts perhaps a better solution would be to have an
rvalue, lvalue, const concepts and allow using multiple concept at the end
of the function signature.
The concepts will be applied right to left and if an inconsistency will be
detected a compile error will occur.
The concepts would be applied on the "this" type and prevent use of member
functions that don't have the same concept list.(perhaps a smarter
evaluation can be used instead)
That will allow to use user defined concepts as constraints on member
functions.
Thanks,
Jonathan
--
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/56647e41-b4bc-412e-b9ec-6fa1f1bb744f%40isocpp.org.
------=_Part_3009_361035436.1537990188320
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>Hello,</div><div><br></div><div>I noticed the proposa=
l to allow specifying && and & at the end of a member function =
signature to apply a constraint on the this that is used.<br>The same can b=
e said in regards to const specifier in member functions.</div><div><br></d=
iv><div>With the addition of concepts perhaps a better solution would be to=
have an rvalue, lvalue, const concepts and allow using multiple concept at=
the end of the function signature.</div><div>The concepts will be applied =
right to left and if an inconsistency will be detected a compile error will=
occur.</div><div><br></div><div>The concepts would be applied on the "=
;this" type and prevent use of member functions that don't have th=
e same concept list.(perhaps a smarter evaluation can be used instead)</div=
><div><br></div><div>That will allow to use user defined concepts as constr=
aints on member functions.</div><div><br></div><div><br></div><div>Thanks,<=
/div><div>Jonathan<br></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/56647e41-b4bc-412e-b9ec-6fa1f1bb744f%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/56647e41-b4bc-412e-b9ec-6fa1f1bb744f=
%40isocpp.org</a>.<br />
------=_Part_3009_361035436.1537990188320--
------=_Part_3008_437621199.1537990188320--
.