From f486290b826213934afbabd0e3e4c57798e3ecbf Mon Sep 17 00:00:00 2001 From: "Timur A. Fatkhullin" Date: Thu, 24 Sep 2026 17:23:32 +0300 Subject: [PATCH] ... --- include/snipplib/network/snplib_netmsg.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/include/snipplib/network/snplib_netmsg.h b/include/snipplib/network/snplib_netmsg.h index be776f0..a5c4cb9 100644 --- a/include/snipplib/network/snplib_netmsg.h +++ b/include/snipplib/network/snplib_netmsg.h @@ -34,7 +34,7 @@ protected: using base_t = keyvalue_expr_t; public: - using base_t::config_t; + using typename base_t::config_t; keyval_netmsg_t(base_t::config_t config = {.keyval_delim = SNPLIB_DEFAULT_NETMSG_KEYVALUE_DELIM, .valseq_delim = SNPLIB_DEFAULT_NETMSG_VALUEVALUE_DELIM}) @@ -69,6 +69,13 @@ public: return msg; } + // to satisfy net_message_c-concept + static keyval_netmsg_t fromBytes(std::span r, + base_t::config_t config = {.keyval_delim = SNPLIB_DEFAULT_NETMSG_KEYVALUE_DELIM, + .valseq_delim = SNPLIB_DEFAULT_NETMSG_VALUEVALUE_DELIM}) + { + return keyval_netmsg_t::fromBytes(r, std::move(config)); + } template OR toBytes() const @@ -82,4 +89,7 @@ public: } }; + +static_assert(net_message_c>, "!!!"); + } // namespace snplib \ No newline at end of file