mirror of
https://github.com/monero-project/monero.git
synced 2024-12-25 11:19:26 -05:00
Replace deprecated result_of with decltype
This commit is contained in:
parent
9866a0e902
commit
808dff7d2f
@ -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)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user