This is the mail archive of the gcc@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++ parser issue [templ.res]


Mark Mitchell <mark@codesourcery.com> writes:

| --On Tuesday, January 28, 2003 05:03:00 PM +0000 Jan Van Dijk
| <janvandijkinjapan@yahoo.co.jp> wrote:
| 
| > 	void good(){ f(); }		// no B<T>:: required
| 
| I *think* this is a parser bug; i.e., this should be an error.
| 
| The question is whether any of the arguments to the function is
| dependent.  Since we are in a non-static member function, a key
| question is whether the "this" parameter should be included, but
| I think not.

"f()" in the above expression is neither a type-dependent expression
nor a value-dependent expression 14.6.2/1:

  [...] Expressions may be type-dependent (on the type of a tem-plate
  parameter) or value-dependent (on the value of a non-type template
  parameter). In an expression of the form: 

      postfix-expression ( expression-list opt ) 

  where the postfix-expression is an identifier, the identifier
  denotes a dependent name if and only if any of the expressions in
  the expression-list is a type-dependent expression (14.6.2.2). 

therefore 14.6.3/1 applies.

-- Gaby


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