Skip to content

Commit

Permalink
Fix constness of MDBOutVal::get()
Browse files Browse the repository at this point in the history
The member function itself needs to be const, not the return value.
  • Loading branch information
Martchus committed Dec 16, 2023
1 parent 02c64c8 commit d8ca70b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lmdb-safe.hh
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ struct LMDB_SAFE_EXPORT MDBOutVal {
return d_mdbval;
}

template <class T, typename std::enable_if<std::is_arithmetic<T>::value, T>::type * = nullptr> const T get()
template <class T, typename std::enable_if<std::is_arithmetic<T>::value, T>::type * = nullptr> T get() const
{
T ret;
if (d_mdbval.mv_size != sizeof(T))
Expand Down

0 comments on commit d8ca70b

Please sign in to comment.