Skip to content

Commit fc23f86

Browse files
committed
std.container.rbtree: Return range elements by ref
1 parent 271ae62 commit fc23f86

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

std/container/rbtree.d

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -679,15 +679,15 @@ private struct RBRange(N)
679679
/**
680680
* Returns the first element in the range
681681
*/
682-
@property Elem front()
682+
ref @property Elem front()
683683
{
684684
return _begin.value;
685685
}
686686

687687
/**
688688
* Returns the last element in the range
689689
*/
690-
@property Elem back()
690+
ref @property Elem back()
691691
{
692692
return _end.prev.value;
693693
}

0 commit comments

Comments
 (0)