Skip to content

Commit 3b83891

Browse files
committed
Changing return signature of 'peek' to prevent unauthorized manipulation of '_val'
1 parent 3e4f2ad commit 3b83891

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Shared.hpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ class Shared
1818

1919
operator T();
2020
void operator = (T const & other);
21-
22-
T & peek() { return _val; }
21+
inline T peek() const { return _val; }
2322

2423

2524
private:

0 commit comments

Comments
 (0)