Topic: Comment on N3882 6.3 Meaning of "nested replacement


Author: Andrew Tomazos <andrewtomazos@gmail.com>
Date: Wed, 22 Jan 2014 07:49:18 -0800 (PST)
Raw View
------=_Part_511_21701973.1390405758624
Content-Type: text/plain; charset=UTF-8

From N3882 6.3:

> Implementations of #2 exist, but apparently not among up-to-date C++
products. Materials published by CPPGM prescribe this behavior to students.

We'd like to make it clear that although the macro nesting rules that were
required by the current CPPGM run are compliant with the current standard,
they should not be considered an endorsement of the current vague standard
requirements about this.

In particular, we agree that Dr. Stroustrups DR 268 should have been
accepted, which would have mandated the gcc-compatible interpretation and
render the previously taught cppgm-compatible way non-compliant.

The committee decision on DR 268 was demonstrably false.  It reads:

> The committee's decision was that no realistic programs "in the wild"
would venture into this area

An easy counter-example is the Boost.Preprocessor library.  It does venture
deeply into this area, and is used "in the wild", so DR 268 was rejected on
a premise (that is at least now) faulty.

--

---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

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

<div dir=3D"ltr"><font face=3D"arial, sans-serif" size=3D"2">From N3882 6.3=
:</font><div><font face=3D"arial, sans-serif" size=3D"2"><br></font></div><=
div><font face=3D"arial, sans-serif" size=3D"2">&gt; Implementations of #2 =
exist, but apparently not among up-to-date C++ products. Materials publishe=
d by CPPGM prescribe this behavior to students.</font></div><div><font face=
=3D"arial, sans-serif" size=3D"2"><br></font></div><div><font face=3D"arial=
, sans-serif" size=3D"2">We'd like to make it clear that although the macro=
 nesting rules that were required by the current CPPGM run are compliant wi=
th the current standard, they should not be considered an endorsement of th=
e current vague standard requirements about this.</font></div><div><font fa=
ce=3D"arial, sans-serif" size=3D"2"><br></font></div><div><font face=3D"ari=
al, sans-serif" size=3D"2">In particular, we agree that Dr. Stroustrups DR =
268 should have been accepted, which would have mandated the gcc-compatible=
 interpretation and render the previously taught cppgm-compatible way non-c=
ompliant.</font></div><div><font face=3D"arial, sans-serif" size=3D"2"><br>=
</font></div><div><font face=3D"arial, sans-serif" size=3D"2">The committee=
 decision on DR 268 was demonstrably false. &nbsp;It reads:</font></div><di=
v><font face=3D"arial, sans-serif" size=3D"2"><br></font></div><div><font f=
ace=3D"arial, sans-serif" size=3D"2">&gt; <span style=3D"background-color: =
rgb(238, 238, 238); color: rgb(0, 0, 0); line-height: 17.804800033569336px;=
">The committee's decision was that no realistic programs "in the wild" wou=
ld venture into this area</span></font></div><div><span style=3D"background=
-color: rgb(238, 238, 238); color: rgb(0, 0, 0); line-height: 17.8048000335=
69336px;"><font face=3D"arial, sans-serif" size=3D"2"><br></font></span></d=
iv><div><font color=3D"#000000" face=3D"arial, sans-serif" size=3D"2"><span=
 style=3D"line-height: 17.804800033569336px; background-color: rgb(238, 238=
, 238);">An easy counter-example is the Boost.Preprocessor library. &nbsp;I=
t does venture deeply into this area, and is used "in the wild", so DR 268 =
was rejected on a premise (that is at least now) faulty.</span></font></div=
><div><br></div></div>

<p></p>

-- <br />
&nbsp;<br />
--- <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 std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_511_21701973.1390405758624--

.


Author: David Krauss <potswa@gmail.com>
Date: Thu, 23 Jan 2014 21:18:19 -0800 (PST)
Raw View
------=_Part_262_16036775.1390540699425
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable



On Wednesday, January 22, 2014 11:49:18 PM UTC+8, Andrew Tomazos wrote:
>
> From N3882 6.3:
>
> > Implementations of #2 exist, but apparently not among up-to-date C++=20
> products. Materials published by CPPGM prescribe this behavior to student=
s.
>
> We'd like to make it clear that although the macro nesting rules that wer=
e=20
> required by the current CPPGM run are compliant with the current standard=
,=20
> they should not be considered an endorsement of the current vague standar=
d=20
> requirements about this.
>

Just Googled you=E2=80=A6 you seem to be speaking for CPPGM here. (Also, yo=
u=20
maintained my favorite FTP client back in the 90's; thanks!)

I'm sorry about not citing CPPGM very well. I was rushing enough to just=20
write what I knew from memory.
=20

> An easy counter-example is the Boost.Preprocessor library.  It does=20
> venture deeply into this area, and is used "in the wild", so DR 268 was=
=20
> rejected on a premise (that is at least now) faulty.
>

I haven't actually checked that Boost.Preprocessor is incompatible with the=
=20
alternative interpretation "2". Is this the case?

--=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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.

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

<div dir=3D"ltr"><br><br>On Wednesday, January 22, 2014 11:49:18 PM UTC+8, =
Andrew Tomazos wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;m=
argin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=
=3D"ltr"><font face=3D"arial, sans-serif" size=3D"2">From N3882 6.3:</font>=
<div><font face=3D"arial, sans-serif" size=3D"2"><br></font></div><div><fon=
t face=3D"arial, sans-serif" size=3D"2">&gt; Implementations of #2 exist, b=
ut apparently not among up-to-date C++ products. Materials published by CPP=
GM prescribe this behavior to students.</font></div><div><font face=3D"aria=
l, sans-serif" size=3D"2"><br></font></div><div><font face=3D"arial, sans-s=
erif" size=3D"2">We'd like to make it clear that although the macro nesting=
 rules that were required by the current CPPGM run are compliant with the c=
urrent standard, they should not be considered an endorsement of the curren=
t vague standard requirements about this.</font></div></div></blockquote><d=
iv><br></div><div>Just Googled you=E2=80=A6 you seem to be speaking for CPP=
GM here. (Also, you maintained my favorite FTP client back in the 90's; tha=
nks!)<br><br>I'm sorry about not citing CPPGM very well. I was rushing enou=
gh to just write what I knew from memory.<br>&nbsp;</div><blockquote class=
=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #cc=
c solid;padding-left: 1ex;"><div dir=3D"ltr"><div><span style=3D"background=
-color:rgb(238,238,238);color:rgb(0,0,0);line-height:17.804800033569336px">=
</span><font color=3D"#000000" face=3D"arial, sans-serif" size=3D"2"><span =
style=3D"line-height:17.804800033569336px;background-color:rgb(238,238,238)=
">An easy counter-example is the Boost.Preprocessor library. &nbsp;It does =
venture deeply into this area, and is used "in the wild", so DR 268 was rej=
ected on a premise (that is at least now) faulty.</span></font></div></div>=
</blockquote><div><br>I haven't actually checked that Boost.Preprocessor is=
 incompatible with the alternative interpretation "2". Is this the case?<br=
><br></div></div>

<p></p>

-- <br />
&nbsp;<br />
--- <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 std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_262_16036775.1390540699425--

.


Author: Andrew Tomazos <andrewtomazos@gmail.com>
Date: Fri, 24 Jan 2014 06:56:32 -0800 (PST)
Raw View
------=_Part_68_9791606.1390575392578
Content-Type: text/plain; charset=UTF-8

On Friday, January 24, 2014 6:18:19 AM UTC+1, David Krauss wrote:
>
> An easy counter-example is the Boost.Preprocessor library.  It does
>> venture deeply into this area, and is used "in the wild", so DR 268 was
>> rejected on a premise (that is at least now) faulty.
>>
>
> I haven't actually checked that Boost.Preprocessor is incompatible with
> the alternative interpretation "2". Is this the case?
>

That is correct.  Boost.Preprocessor relies on the DR 268 behaviour.

--

---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

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

<div dir=3D"ltr">On Friday, January 24, 2014 6:18:19 AM UTC+1, David Krauss=
 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"><block=
quote 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><font color=3D"#000=
000" face=3D"arial, sans-serif" size=3D"2"><span style=3D"line-height:17.80=
4800033569336px;background-color:rgb(238,238,238)">An easy counter-example =
is the Boost.Preprocessor library. &nbsp;It does venture deeply into this a=
rea, and is used "in the wild", so DR 268 was rejected on a premise (that i=
s at least now) faulty.</span></font></div></div></blockquote><div><br>I ha=
ven't actually checked that Boost.Preprocessor is incompatible with the alt=
ernative interpretation "2". Is this the case?<br></div></div></blockquote>=
<div><br></div><div>That is correct. &nbsp;Boost.Preprocessor relies on the=
 DR 268 behaviour.</div><div><br></div></div>

<p></p>

-- <br />
&nbsp;<br />
--- <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 std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_68_9791606.1390575392578--

.


Author: Maurice Bos <m-ou.se@m-ou.se>
Date: Sat, 25 Jan 2014 15:22:27 +0100
Raw View
--00248c0ee5266e0bc804f0cc3570
Content-Type: text/plain; charset=UTF-8

Here's a short example that relies on this behaviour:
https://gist.github.com/m-ou-se/6079075

Using this behaviour seems to be the only 'practical' way to iterate over a
list using the preprocessor: Format the list as (1)(2)(3)(4) and prefix it
with the name of a macro that starts this chain reaction of macro
invocations that's only possible with DR268.

Kind regards,
Maurice Bos


2014/1/24 Andrew Tomazos <andrewtomazos@gmail.com>

> On Friday, January 24, 2014 6:18:19 AM UTC+1, David Krauss wrote:
>>
>> An easy counter-example is the Boost.Preprocessor library.  It does
>>> venture deeply into this area, and is used "in the wild", so DR 268 was
>>> rejected on a premise (that is at least now) faulty.
>>>
>>
>> I haven't actually checked that Boost.Preprocessor is incompatible with
>> the alternative interpretation "2". Is this the case?
>>
>
> That is correct.  Boost.Preprocessor relies on the DR 268 behaviour.
>
>  --
>
> ---
> 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.
> Visit this group at
> http://groups.google.com/a/isocpp.org/group/std-proposals/.
>

--

---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

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

<div dir=3D"ltr">Here&#39;s a short example that relies on this behaviour: =
<a href=3D"https://gist.github.com/m-ou-se/6079075">https://gist.github.com=
/m-ou-se/6079075</a><br><br>Using this behaviour seems to be the only &#39;=
practical&#39; way to iterate over a list using the preprocessor: Format th=
e list as (1)(2)(3)(4) and prefix it with the name of a macro that starts t=
his chain reaction of macro invocations that&#39;s only possible with DR268=
..<br>

<br>Kind regards,<br>Maurice Bos<br></div><div class=3D"gmail_extra"><br><b=
r><div class=3D"gmail_quote">2014/1/24 Andrew Tomazos <span dir=3D"ltr">&lt=
;<a href=3D"mailto:andrewtomazos@gmail.com" target=3D"_blank">andrewtomazos=
@gmail.com</a>&gt;</span><br>

<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div class=3D"im">On Friday=
, January 24, 2014 6:18:19 AM UTC+1, David Krauss wrote:<blockquote class=
=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc s=
olid;padding-left:1ex">

<div dir=3D"ltr"><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><font color=3D"#000000" face=3D"arial, sans-serif"><span style=3D"line-=
height:17.804800033569336px;background-color:rgb(238,238,238)">An easy coun=
ter-example is the Boost.Preprocessor library. =C2=A0It does venture deeply=
 into this area, and is used &quot;in the wild&quot;, so DR 268 was rejecte=
d on a premise (that is at least now) faulty.</span></font></div>

</div></blockquote><div><br>I haven&#39;t actually checked that Boost.Prepr=
ocessor is incompatible with the alternative interpretation &quot;2&quot;. =
Is this the case?<br></div></div></blockquote><div><br></div></div><div>

That is correct. =C2=A0Boost.Preprocessor relies on the DR 268 behaviour.</=
div><div><br></div></div><div class=3D"HOEnZb"><div class=3D"h5">

<p></p>

-- <br>
=C2=A0<br>
--- <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%2Bunsubscribe@isocpp.org" target=3D=
"_blank">std-proposals+unsubscribe@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>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/" target=3D"_blank">http://groups.google.com/a/isocpp.org/gro=
up/std-proposals/</a>.<br>
</div></div></blockquote></div><br></div>

<p></p>

-- <br />
&nbsp;<br />
--- <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 std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

--00248c0ee5266e0bc804f0cc3570--

.