Merge pull request #9515

808dff7 Replace deprecated result_of with decltype (Lee Clagett)
This commit is contained in:
luigi1111 2024-12-23 10:42:45 -05:00
commit 0a1fd18ad2
No known key found for this signature in database
GPG Key ID: F4ACA0183641E010

View File

@ -111,7 +111,7 @@ namespace lmdb
\return The result of calling `f`. \return The result of calling `f`.
*/ */
template<typename 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) for (unsigned i = 0; i < attempts; ++i)
{ {