From 12f415fd19d002680ca2b08dae7acf91bd1db634 Mon Sep 17 00:00:00 2001 From: mutouyun Date: Sun, 14 Aug 2022 00:34:50 +0800 Subject: [PATCH] fix: [log] generic constructor may shadow the default copy constructor --- CMakeLists.txt | 1 + include/libimp/log.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c33a54b..046eb21 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,7 @@ set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNDEBUG") if(NOT MSVC) set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2") + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_DEBUG} -g -rdynamic") endif() if (MSVC) diff --git a/include/libimp/log.h b/include/libimp/log.h index 34a8190..92ea435 100644 --- a/include/libimp/log.h +++ b/include/libimp/log.h @@ -92,7 +92,8 @@ class LIBIMP_EXPORT printer { public: printer() noexcept = default; - template + template ::value>> printer(T &p) noexcept : objp_ (static_cast(&p)) , vtable_(detail_log::traits::make_vtable()) {}