Replace deprecated result_of with decltype (#139)
Some checks failed
unix-ci / build-tests (macos-12, WITH_RMQ=OFF) (push) Has been cancelled
unix-ci / build-tests (macos-12, WITH_RMQ=ON) (push) Has been cancelled
unix-ci / build-tests (macos-13, WITH_RMQ=OFF) (push) Has been cancelled
unix-ci / build-tests (macos-13, WITH_RMQ=ON) (push) Has been cancelled
unix-ci / build-tests (macos-latest, WITH_RMQ=OFF) (push) Has been cancelled
unix-ci / build-tests (macos-latest, WITH_RMQ=ON) (push) Has been cancelled
unix-ci / build-tests (ubuntu-20.04, WITH_RMQ=OFF) (push) Has been cancelled
unix-ci / build-tests (ubuntu-20.04, WITH_RMQ=ON) (push) Has been cancelled
unix-ci / build-tests (ubuntu-22.04, WITH_RMQ=OFF) (push) Has been cancelled
unix-ci / build-tests (ubuntu-22.04, WITH_RMQ=ON) (push) Has been cancelled
unix-ci / build-tests (ubuntu-latest, WITH_RMQ=OFF) (push) Has been cancelled
unix-ci / build-tests (ubuntu-latest, WITH_RMQ=ON) (push) Has been cancelled

This commit is contained in:
Lee *!* Clagett 2024-10-10 18:07:55 -04:00 committed by GitHub
parent fa7642be3c
commit b6f785316f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -111,7 +111,7 @@ namespace lws_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)
{