Skip to content

Commit

Permalink
fix msvc
Browse files Browse the repository at this point in the history
  • Loading branch information
poor-circle committed Jul 6, 2023
1 parent d2215fd commit 19a7146
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions include/ylt/struct_pack/struct_pack_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -518,8 +518,12 @@ consteval type_id get_type_id() {
else if constexpr (std::is_enum_v<T>) {
return get_integral_type<std::underlying_type_t<T>>();
}
else if constexpr (std::is_integral_v<T> || std::is_same_v<__int128, T> ||
std::is_same_v<unsigned __int128, T>) {
else if constexpr (std::is_integral_v<T>
#if __GNUC__ || __CLANG__
|| std::is_same_v<__int128, T> ||
std::is_same_v<unsigned __int128, T>
#endif
) {
return get_integral_type<T>();
}
else if constexpr (std::is_floating_point_v<T>) {
Expand Down Expand Up @@ -574,7 +578,7 @@ consteval type_id get_type_id() {
else {
static_assert(!sizeof(T), "not supported type");
}
}
} // namespace detail

template <size_t size>
consteval decltype(auto) get_size_literal() {
Expand Down

0 comments on commit 19a7146

Please sign in to comment.