Skip to content

Commit 2a89d60

Browse files
Update contents/stacks_and_queues/code/c++/queue.cpp
adding version T const& front() const Co-authored-by: Dimitri Belopopsky <[email protected]>
1 parent feb723c commit 2a89d60

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

contents/stacks_and_queues/code/c++/queue.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ namespace my {
5757
}
5858

5959
T& front() const { return _front->value; }
60+
T const& front() const { return _front->value; }
6061
// returning reference can very usefull if someone wants to modify _front element
6162

6263
size_t size() const { return count; }

0 commit comments

Comments
 (0)