From 092548d2126c6c36f5d3e5c904051a16ba13a018 Mon Sep 17 00:00:00 2001 From: saipubw Date: Mon, 12 Aug 2024 15:59:20 +0800 Subject: [PATCH] [struct_pack][fix] fix compile error in msvc (#745) --- 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; } }