Typeless function arguments

Rainer Deyke rainerd at eldwood.com
Sat Oct 16 18:31:17 PDT 2010


On 10/16/2010 19:26, dsimcha wrote:
> The rule with uninstantiated template bodies is that the code needs to be
> syntactically correct, but not necessarily semantically correct (since the
> semantics can only be fully analyzed on instantiation).  void foo(t) looks
> syntactically incorrect.

I think 'void foo(t)' is syntactically correct.  You can't know that 't'
isn't the name of a type without semantic analysis.


-- 
Rainer Deyke - rainerd at eldwood.com


More information about the Digitalmars-d mailing list