Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
poor-circle committed Aug 1, 2023
1 parent cc7b90f commit 0ba2405
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions include/ylt/struct_pack/struct_pack_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -928,8 +928,11 @@ constexpr decltype(auto) get_type_literal() {
else {
constexpr auto id = get_type_id<Arg>();
constexpr auto ret = string_literal<char, 1>{{static_cast<char>(id)}};
if constexpr (id == type_id::non_trivial_class_t ||
id == type_id::trivial_class_t) {
if constexpr (id == type_id::monostate_t) {
return ret;
}
else if constexpr (id == type_id::non_trivial_class_t ||
id == type_id::trivial_class_t) {
using Args = decltype(get_types<Arg>());
constexpr auto body = get_type_literal<Args, Arg, ParentArgs...>(
std::make_index_sequence<std::tuple_size_v<Args>>());
Expand Down

0 comments on commit 0ba2405

Please sign in to comment.