Topic: Rationale for why concepts can only be declared at
Author: Anthony Hall <anthrond@gmail.com>
Date: Tue, 20 Dec 2016 16:25:05 -0800 (PST)
Raw View
------=_Part_1560_1765879192.1482279905329
Content-Type: multipart/alternative;
boundary="----=_Part_1561_515268603.1482279905329"
------=_Part_1561_515268603.1482279905329
Content-Type: text/plain; charset=UTF-8
Reading the current version of the Concepts TS, n4630, I see that both
variable and function concepts are only allowed at namespace scope, but I
don't see a reason given for this. I first stumbled upon this restriction
while trying to write concepts in the private: section of a class, because
they would be useful to me in writing the class itself, but they have no
use in the class's interface or to outside client code.
I also would find being able to write them in
struct/class/function/lambade/basically any scope, as a way to factor out
repetitive ad-hoc 'requires' constraints.
Does anyone know the reasons that concepts have been explicitly limited to
namespace scope?
--
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/1dd1345b-0bc7-4768-8afd-fd6f4f611d8a%40isocpp.org.
------=_Part_1561_515268603.1482279905329
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Reading the current version of the Concepts TS,=C2=A0n4630=
, I see that both variable and function concepts are only allowed at namesp=
ace scope, but I don't see a reason given for this. =C2=A0I first stumb=
led upon this restriction while trying to write concepts in the private: se=
ction of a class, because they would be useful to me in writing the class i=
tself, but they have no use in the class's interface or to outside clie=
nt code.<br><br>I also would find being able to write them in struct/class/=
function/lambade/basically any scope, as a way to factor out repetitive ad-=
hoc 'requires' constraints.<div><br></div><div>Does anyone know the=
reasons that concepts have been explicitly limited to namespace scope?</di=
v></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/1dd1345b-0bc7-4768-8afd-fd6f4f611d8a%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/1dd1345b-0bc7-4768-8afd-fd6f4f611d8a=
%40isocpp.org</a>.<br />
------=_Part_1561_515268603.1482279905329--
------=_Part_1560_1765879192.1482279905329--
.