From 8dde3bbfcc30180f66d661158af96c081d700d5c Mon Sep 17 00:00:00 2001 From: MeanSquaredError <35379301+MeanSquaredError@users.noreply.github.com> Date: Fri, 15 Sep 2023 00:46:06 +0300 Subject: [PATCH] Replace std::decay_t -> std::decay::type. Do not use lambda capture initializers. --- tests/include/ConnectionPoolTests.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/include/ConnectionPoolTests.h b/tests/include/ConnectionPoolTests.h index 35b4330a..081592ce 100644 --- a/tests/include/ConnectionPoolTests.h +++ b/tests/include/ConnectionPoolTests.h @@ -41,13 +41,13 @@ namespace sqlpp namespace { template - using native_type = std::decay_t().get().native_handle())>; + using native_type = typename std::decay().get().native_handle())>::type; template using native_set = std::unordered_set>; template - using pool_conn_type = std::decay_t().get())>; + using pool_conn_type = typename std::decay().get())>::type; template native_set get_native_handles(Pool& pool) @@ -166,7 +166,7 @@ namespace sqlpp try { model::TabDepartment tabDept = {}; - auto connections = std::vector>{}; + auto connections = std::vector::type>{}; auto pointers = std::set{}; for (auto i = 0; i < 50; ++i) { @@ -204,7 +204,9 @@ namespace sqlpp for (auto i = 0; i < thread_count; ++i) { - threads.push_back(std::thread([func = __func__, call_count = uniform_dist(random_engine), &pool, &tabDept]() { + auto func = __func__; + auto call_count = uniform_dist(random_engine); + threads.push_back(std::thread([&]() { try { for (auto k = 0; k < call_count; ++k)