Return by reference and pass by reference working with objects. Closures might present problems, however
This commit is contained in:
@@ -245,4 +245,9 @@ Type Type::withDecreasedIndirection() {
|
||||
newOne->decreaseIndirection();
|
||||
return *newOne;
|
||||
}
|
||||
Type* Type::withoutReference() {
|
||||
Type *newOne = clone();
|
||||
newOne->is_reference = false;
|
||||
return newOne;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user