From 8105ecf81d7c0f27a721b690b679c20f8ea20d07 Mon Sep 17 00:00:00 2001 From: "Zezheng.Li" Date: Mon, 12 Aug 2024 11:31:52 +0800 Subject: [PATCH] [struct_pack][fix] fix compile error in msvc --- include/ylt/struct_pack/reflection.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/ylt/struct_pack/reflection.hpp b/include/ylt/struct_pack/reflection.hpp index fb61b2ced..ed48ca983 100644 --- a/include/ylt/struct_pack/reflection.hpp +++ b/include/ylt/struct_pack/reflection.hpp @@ -593,10 +593,10 @@ template template constexpr decltype(auto) delay_sp_config_eval() { if constexpr (sizeof(T)==0) { - return (T*){}; + return (T*)nullptr; } else { - return (sp_config*){}; + return (sp_config*)nullptr; } }