This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++ PATCH] Make parser revert digraph "<:"


Jason Merrill <jason@redhat.com> writes:

| On 26 Jan 2004 18:53:28 +0100, Gabriel Dos Reis <gdr@integrable-solutions.net> wrote:
| 
| > Jason Merrill <jason@redhat.com> writes:
| >
| > | On Sun, 25 Jan 2004 23:58:11 -0800, "Zack Weinberg" <zack@codesourcery.com> wrote:
| > | 
| > | > Gabriel Dos Reis <gdr@integrable-solutions.net> writes:
| > | >
| > | >> "Zack Weinberg" <zack@codesourcery.com> writes:
| > | >>
| > | >> | Therefore I think that "'<::' cannot begin a template-argument list"
| > | >> | (with additional explanation in note:s) is clear and factually
| > | >> | accurate, while remaining appropriately brief.
| > | >>
| > | >> It is certainly brief but it is neither clear nor factually accurate.
| > | >
| > | > To this, I can only say that I disagree.
| > | 
| > | I agree with Zack.  In the code in question "<::" does begin the
| > | template-argument-list in a textual sense.  Any other interpretation would
| > | require a deliberate misreading.
| >
| > I dont' think so.  In the textual sense, what begins the
| > template-argument list is the character '<'
| 
| begin, v.tr.
| 2. To cause to come into being; originate.
| 3. To come first in: "The numeral 1 begins the sequence."
| 
| In the sense of definition 3, textually, both "<" and "<::" begin the
| template-argument-list.  To me, this is the obvious interpretation of the
| message.
| 
| Are you thinking in terms of definition 2?

Yes.  

When reading a program text, how do a programmer knows that a
template-argument list starts?  He/she looks for '<' in a pattern like 
<xxx> 
(don't tell me you look for '<::' :-/)

Moreover, the '::' stuff is supposed to be part of the template-argument.  

-- Gaby


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]