From 9fa9fbfddf495434a5e86ec35645350f0655b1b9 Mon Sep 17 00:00:00 2001 From: Teebonne <80053070+Teebonne@users.noreply.github.com> Date: Mon, 10 Oct 2022 20:08:02 +0100 Subject: [PATCH] Rebuild with string argument, like the constructor More convenient --- zmq.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/zmq.hpp b/zmq.hpp index 979ac9a..775c6f6 100644 --- a/zmq.hpp +++ b/zmq.hpp @@ -538,6 +538,11 @@ class message_t throw error_t(); memcpy(data(), data_, size_); } + + void rebuild(const std::string &str) + { + rebuild(str.data(), str.size()); + } void rebuild(void *data_, size_t size_, free_fn *ffn_, void *hint_ = ZMQ_NULLPTR) {