From 95bb371b0d46fddf449f1248f2399247e0a250e2 Mon Sep 17 00:00:00 2001 From: Leonid Yuriev Date: Thu, 10 Oct 2019 00:25:24 +0300 Subject: [PATCH] mdbx-test: fix build by non-c++17 compilers. Change-Id: I899f1a39eb8fde3ce3821b5964885f1121e65be3 --- test/nested.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/nested.cc b/test/nested.cc index e6202464..e407f2eb 100644 --- a/test/nested.cc +++ b/test/nested.cc @@ -75,7 +75,11 @@ void testcase_nested::push_txn() { prng32() & (MDBX_NOSYNC | MDBX_NOMETASYNC | MDBX_MAPASYNC), &txn); if (unlikely(err != MDBX_SUCCESS)) failure_perror("mdbx_txn_begin(nested)", err); +#if __cplusplus >= 201703L stack.emplace(txn, serial, fifo, speculum); +#else + stack.push(std::make_tuple(scoped_txn_guard(txn), serial, fifo, speculum)); +#endif std::swap(txn_guard, std::get<0>(stack.top())); log_verbose("begin level#%zu txn, serial %" PRIu64, stack.size(), serial); }