C++ parser issue [templ.res]
Gabriel Dos Reis
gdr@integrable-solutions.net
Tue Jan 28 20:02:00 GMT 2003
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
More information about the Gcc
mailing list