Skip to content

Commit

Permalink
added lambda handling in partial
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenberry committed Oct 14, 2022
1 parent 1921d08 commit bb87b97
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion include/glaze/binary/write.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,12 @@ namespace glz
std::get<member_it->second.index()>(member_it->second);

detail::dump_int(key_to_int.find(key)->second, buffer);
write<sub_partial, Opts>(value.*member_ptr, buffer);
if constexpr (std::is_member_pointer_v<decltype(member_ptr)>) {
write<sub_partial, Opts>(value.*member_ptr, buffer);
}
else {
write<sub_partial, Opts>(member_ptr(value), buffer);
}
});
}
else if constexpr (detail::map_t<std::decay_t<T>>) {
Expand Down

0 comments on commit bb87b97

Please sign in to comment.