On 3/13/12 5:39 PM, kennytm wrote:
Andrei Alexandrescu<seewebsiteforem...@erdani.org>  wrote:
Because in the general case functions call one another so there's no way
to figure which to look at first.

Andrei

That's no difference from template functions calling each others right?

     int a()(int x) { return x==0?1:b(x-1); }
     int b()(int x) { return x==0?1:a(x-1); }

There is. Templates are guaranteed to have the body available. Walter uses a recursive on-demand approach instead of a worklist approach for inferring attributes (worklists have an issue I forgot about).

Andrei

Reply via email to