RE: [sv-ec] Mantis 1857 rationale - extern method types for parameterized classes

From: Francoise Martinolle <fm_at_.....>
Date: Mon Jun 18 2007 - 08:42:11 PDT
 
Mike,
 
We cannot do either of your alternatives. 
An extern method body must be able to refer to
declarations which appear between the "endclass" and the beginning of
the body of the extern method.
Consequently you cannot say that the method body is as if it were
defined inside the class. Gordon
provided some really good examples a few months ago which make this
alternative not possible.
 
Right now there is no provision for hierarchically refer to a type
except in some cases (interface types).
Using "::T" would be unique, and I would rather trying to use consistent
rules in the LRM and not inventing
new ones. It is already too complex.
I personally like the new prototype syntax.
 
Francoise
       '



________________________________

	From: owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] On Behalf
Of Mike Mintz
	Sent: Monday, June 18, 2007 11:06 AM
	To: Jonathan Bromley
	Cc: Gordon Vreugdenhil; SV_EC List
	Subject: Re: [sv-ec] Mantis 1857 rationale - extern method types
for parameterized classes
	
	
	Gord,
	
	>In the first case, the name "T" is visible in the scope
	of the definition (i.e. the "typedef bit T") so that is
	the "T" that will be selected.  Clearly that is incorrect. 
	
	
	This is the incorrect behavior. Can we say that a scoped method
body (such as this) is within the scope of the declaration (for name
resolution purposes) ?
	
	If not, what about saying that the unchanged code means the
templated param, and that, if the bit T is wanted, it needs to have a
"::" to say the outer scope? 
	
	My feeling is that a rule is better than syntax. 
	
	Take Care,
	Mike
	
	
	On 6/18/07, Jonathan Bromley < jonathan.bromley@doulos.com
<mailto:jonathan.bromley@doulos.com> > wrote: 

		Gord,
		
		I absolutely concur with the motivation and solution.
As long as 
		you and all the heavy-duty compiler folk are happy that
the
		solution is bombproof, I'm happy.
		--
		Jonathan
		
		
		-- This message has been scanned for viruses
anddangerous content by MailScanner, and isbelieved to be clean. 
		
		



	-- 
	This message has been scanned for viruses and 
	dangerous content by MailScanner <http://www.mailscanner.info/>
, and is 
	believed to be clean. 


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Mon Jun 18 08:43:09 2007

This archive was generated by hypermail 2.1.8 : Mon Jun 18 2007 - 08:43:24 PDT