From 89081b62be93781d564f5d3ecfb66a3114e415a8 Mon Sep 17 00:00:00 2001 From: aba_aba_da_duo_duo <49055103+982945902@users.noreply.github.com> Date: Thu, 29 Jun 2023 15:50:41 +0800 Subject: [PATCH] Update struct_pack_impl.hpp --- include/struct_pack/struct_pack/struct_pack_impl.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/struct_pack/struct_pack/struct_pack_impl.hpp b/include/struct_pack/struct_pack/struct_pack_impl.hpp index a65bbdd14..bb1d0ed76 100644 --- a/include/struct_pack/struct_pack/struct_pack_impl.hpp +++ b/include/struct_pack/struct_pack/struct_pack_impl.hpp @@ -432,6 +432,15 @@ consteval type_id get_integral_type() { "sizeof(bool)!=1, which is not supported."); return type_id::bool_t; } +#if __GNUC__ || __clang__ + //-std=gnu++20 + else if constexpr (std::is_same_v<__int128, T>) { + return type_id::int128_t; + } + else if constexpr (std::is_same_v) { + return type_id::uint128_t; + } +#endif else { /* * Due to different data model, @@ -522,6 +531,7 @@ consteval type_id get_type_id() { return get_integral_type(); } #if __GNUC__ || __clang__ + //-std=c++20 else if constexpr (std::is_same_v<__int128, T>) { return type_id::int128_t; }