From 53c4c9a797121a1faf6f60fc035a03ab08f0f7d6 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/ylt/struct_pack/struct_pack_impl.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/ylt/struct_pack/struct_pack_impl.hpp b/include/ylt/struct_pack/struct_pack_impl.hpp index 3c95663b5..6f01f937c 100644 --- a/include/ylt/struct_pack/struct_pack_impl.hpp +++ b/include/ylt/struct_pack/struct_pack_impl.hpp @@ -431,6 +431,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, @@ -521,6 +530,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; }