Topic: Proposed: allow preprocessor symbol definitions to
Author: "'Walt Karas' via ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Date: Sun, 2 Apr 2017 06:10:00 -0700 (PDT)
Raw View
------=_Part_3436_1316733155.1491138600562
Content-Type: multipart/alternative;
boundary="----=_Part_3437_823505020.1491138600562"
------=_Part_3437_823505020.1491138600562
Content-Type: text/plain; charset=UTF-8
A bare-bones approach would be to add the directive
#hide *integral-expression*
which, if the expression is non-zero, would hide all definitions that did
not being with the prefix MACRO_ . (Hiding disabled when the expression
was zero.) All preprocessor definitions specified by the Standard would
have a synonym added with the reserved prefix MACRO_STD_ .
A more general approach would be to add the directives
#push [ *identifier* ] [ * ]
#push_except [ *identifier* ] [ * ]
which would push definitions onto per-name "hide stacks". The asterisk
means push all names having the identifier as a prefix. Omitting the
identifier, or the identifier and the asterisk, would mean push all
currently-defined names. Unhiding names would be accomplished with
corresponding pop directives
#pop [ *identifier* ] [ * ]
#pop_except [ *identifier* ] [ * ]
Popping an unpushed name would have no effect.
--
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/bf7f7d07-ca2b-457e-ba7e-46dadb0a62c4%40isocpp.org.
------=_Part_3437_823505020.1491138600562
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">A bare-bones approach would be to add the directive<div><b=
r></div><div>#hide <i>integral-expression</i></div><div><i><br></i></div><d=
iv>which, if the expression is non-zero, would hide all definitions that di=
d not being with the prefix MACRO_ . =C2=A0(Hiding disabled when the expres=
sion was zero.) =C2=A0All preprocessor definitions specified by the Standar=
d would have a synonym added with the reserved prefix MACRO_STD_ .</div><di=
v><br></div><div>A more general approach would be to add the directives</di=
v><div><br></div><div>#push [ <i>identifier</i>=C2=A0] [ * ]</div><div>#pus=
h_except [ <i>identifier</i>=C2=A0] [ * ]</div><div><br></div><div>which wo=
uld push definitions onto per-name "hide stacks". =C2=A0The aster=
isk means push all names having the identifier as a prefix. =C2=A0Omitting =
the identifier, or the identifier and the asterisk, would mean push all cur=
rently-defined names. =C2=A0Unhiding names would be accomplished with corre=
sponding pop directives</div><div><br></div><div><div>#pop [=C2=A0<i>identi=
fier</i>=C2=A0] [ * ]</div><div>#pop_except [=C2=A0<i>identifier</i>=C2=A0]=
[ * ]</div></div><div><br></div><div>Popping an unpushed name would have n=
o effect.</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/bf7f7d07-ca2b-457e-ba7e-46dadb0a62c4%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/bf7f7d07-ca2b-457e-ba7e-46dadb0a62c4=
%40isocpp.org</a>.<br />
------=_Part_3437_823505020.1491138600562--
------=_Part_3436_1316733155.1491138600562--
.