Interestingly, this is a workaround that may be workable somehow. I've even been able to expand it so that the R.value type is determined by a temnplate.

struct node( P )
{
   P payload;
   node* pred;
   node* succ;
}

struct R( V )
{
   V value;
   alias node!R N;
   d_list!N Rlist;
}

struct d_list( N )
{
   N* head;
   N* tail;
   // even this works
   ref typeof(N.payload) getFirstValue(){
      return head.payload;
   }
}


--rt

Reply via email to