4#include "msgpack_impl/drop_keys.hpp"
10template <msgpack_concepts::HasMsgPack T>
void msgpack_apply(
const auto& func,
auto&... args)
12 std::apply(func, msgpack::drop_keys(std::tie(args...)));
19template <msgpack_concepts::HasMsgPack T>
void msgpack_apply(
const T& value,
const auto& func)
21 auto static_checker = [&](
auto&... value_args) {
23 "MSGPACK_FIELDS requires a constructor that can take the types listed in MSGPACK_FIELDS. "
24 "Type or arg count mismatch, or member initializer constructor not available.");
27 const_cast<T&
>(value).msgpack([&](
auto&... args) {
28 std::apply(static_checker, msgpack::drop_keys(std::tie(args...)));
29 msgpack_apply<T>(func, args...);
Definition: concepts.hpp:16