C++ reference type

Hasan Aljudy hasan.aljudy at gmail.com
Sat Jun 24 06:27:21 PDT 2006


Yossarian wrote:
> Tesuji napsal(a):
> 
>> Will C++ reference type ever be included in D? In one form or the other?
>>
>>
> what do you mean? every complex object is internally passed by 
> reference, and if you want the same behaviour as in c++ references, try 
> inout keyword in declaration:
> D:   void func(inout int a);
> is equal to
> C++: void func(int &a);

The only thing missing is a reference return type.



More information about the Digitalmars-d mailing list