Skip to content

Commit 5aa72fd

Browse files
committed
fix stack assignment operator
1 parent a60a7e1 commit 5aa72fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stl-cp/stack.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class stack
5454
}
5555

5656
// copy assignment operator
57-
stack<T>& operator=(stack<T> &other) {
57+
stack<T>& operator=(stack<T> other) {
5858
using std::swap;
5959
swap(mSize,other.mSize);
6060
swap(mCap,other.mCap);

0 commit comments

Comments
 (0)