Question about auto ref
Namespace
rswhite4 at googlemail.com
Wed Mar 27 06:05:06 PDT 2013
So I changed it into 'ref&'.
Quick example:
[code]
void bar1(ref& A a) { } // OK
void bar2(ref &A a) { } // OK
void bar21(&A a) { } // Error: '&' can only be used in
combination with 'ref'.
void bar22(& A a) { } // Error: '&' can only be used in
combination with 'ref'.
void bar3(ref const& A a) { } // OK
void bar4(ref const &A a) { } // OK
void bar5(ref &const A a) { } // Error: '&' Must be directly used
in front of the type.
void bar6(ref& const A a) { } // Error: '&' Must be directly used
in front of the type.
[/code]
Thoughts?
More information about the Digitalmars-d-learn
mailing list