More bugs...
Timon Gehr
timon.gehr at gmx.ch
Sat Apr 28 02:36:54 PDT 2012
On 04/28/2012 08:03 AM, Mehrdad wrote:
>> You expected that to work?
>
> Uhm, why not?
>
> template<class T>
> struct F
> {
> F<F<T> > f() { return F<F<T> >(); }
> };
>
> int main()
> {
> F<int>().f().f().f().f().f(); // etc.
> return 0;
> }
D templates are analysed eagerly upon instantiation, whereas C++
templates are analysed lazily. This is not a bug, it is a feature.
More information about the Digitalmars-d
mailing list