From a58d8e908edc8834f1b6831ad7d96adb78e28426 Mon Sep 17 00:00:00 2001 From: Stephen Webb Date: Thu, 19 Oct 2023 14:41:14 +1100 Subject: [PATCH] Fix gcc/clang errors --- src/main/include/log4cxx/helpers/widelife.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/include/log4cxx/helpers/widelife.h b/src/main/include/log4cxx/helpers/widelife.h index 8361a569b..5c0073afa 100644 --- a/src/main/include/log4cxx/helpers/widelife.h +++ b/src/main/include/log4cxx/helpers/widelife.h @@ -36,13 +36,17 @@ template class WideLife { public: - template + WideLife() + { + new(&storage) T(); + } + template #if defined(__cpp_concepts) && __cpp_concepts >= 201500 - requires (!std::same_as) + requires (!std::same_as) #endif - WideLife(Args&&... args) + WideLife(Arg0 arg0, Args&&... args) { - new(&storage) T(std::forward(args)...); + new(&storage) T(arg0, std::forward(args)...); } ~WideLife()