Kagamin Wrote:

> > - >The 'this' parameter to struct member functions is now a reference 
> > type,< I know this was discussed, but how does this change code? Does this 
> > forces to change C code when it is ported to D? How to do such porting? Few 
> > examples of situations may be useful.
> 
> I'm affraid, this breaks my resource parser
> 
> struct ResourceTable
> {
>       ushort Shift; //alignment shift count
>       ResourceType* FirstType()
>       {
>               return cast(ResourceType*)(this+1);
>       }
> }

Try this:

  return cast(ResourceType*)(&this + 1);

Reply via email to