From f496f9c2aeb8ba019a9bb0fee6b9bad9c973f7dc Mon Sep 17 00:00:00 2001 From: Georgy Kirichenko Date: Sun, 24 Dec 2023 22:13:57 +0300 Subject: [PATCH] Do not use std::move as it prevents from copy ellision Relates #169 --- common/generation.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/generation.h b/common/generation.h index 6c434be1..26ab14e6 100644 --- a/common/generation.h +++ b/common/generation.h @@ -112,7 +112,7 @@ class generation_manager [[nodiscard]] std::shared_lock current_lock_guard() const { - return std::move(std::shared_lock(current_mutex)); + return std::shared_lock(current_mutex); } const Type& current() const