Skip to content

Commit

Permalink
Replace deprecated result_of with decltype
Browse files Browse the repository at this point in the history
  • Loading branch information
vtnerd committed Oct 10, 2024
1 parent 9866a0e commit 808dff7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lmdb/database.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ namespace lmdb
\return The result of calling `f`.
*/
template<typename F>
typename std::result_of<F(MDB_txn&)>::type try_write(F f, unsigned attempts = 3)
auto try_write(F f, unsigned attempts = 3) -> decltype(f(std::declval<MDB_txn&>()))
{
for (unsigned i = 0; i < attempts; ++i)
{
Expand Down

0 comments on commit 808dff7

Please sign in to comment.