Re: Cannot find source of undefined identifier
From: John Harrison (john_andronicus_at_hotmail.com)
Date: 03/30/04
- Next message: John Harrison: "Re: Generating Compiler Warnings"
- Previous message: Kevin Goodsell: "Re: parameter argc is never used ?"
- In reply to: Rob Williscroft: "Re: Cannot find source of undefined identifier"
- Next in thread: Rob Williscroft: "Re: Cannot find source of undefined identifier"
- Reply: Rob Williscroft: "Re: Cannot find source of undefined identifier"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 30 Mar 2004 22:31:44 +0100
>
> The error is related to two-pahse name lookup, when a compiler
> supports this feature, identifiers in templates are bound
> when the template is first parsed, unless the name is dependant
> on a template paramiter. All of the 3 options above tell the
> compiler that 'is_goal' is a dependant name.
>
Foolishly I thought I'd try and work this out from the standard. Since I've
never thoroughly understood dependent name lookup I've probably made a
mistake but as far as I can tell is_goal is a dependent name.
14.6.2 para 1 says that in expressions of the form
identifier ( expression-list )
identifier is a dependent name if and only if and of the expressions in
expression-list are type-dependent expressions. In this case then only
expression is current_state.
14.6.2.2 para 3 says that current_state is type dependent name since it was
declared with a template parameter (STATE_T)
Therefore is_goal is a dependent name and should be looked up when the
template is instantiated not when it is parsed.
Where's the mistake in my reasoning?
john
- Next message: John Harrison: "Re: Generating Compiler Warnings"
- Previous message: Kevin Goodsell: "Re: parameter argc is never used ?"
- In reply to: Rob Williscroft: "Re: Cannot find source of undefined identifier"
- Next in thread: Rob Williscroft: "Re: Cannot find source of undefined identifier"
- Reply: Rob Williscroft: "Re: Cannot find source of undefined identifier"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|