From af1f3d8fb4f1cde0d0b3b41336a95512998fd3e1 Mon Sep 17 00:00:00 2001 From: Mikhail Sokolovskiy Date: Wed, 22 Jun 2022 12:51:58 +0300 Subject: [PATCH] Create Popen::send overload for std::string --- subprocess.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/subprocess.hpp b/subprocess.hpp index 8fbbaa3..aaed3c7 100755 --- a/subprocess.hpp +++ b/subprocess.hpp @@ -1288,6 +1288,9 @@ public: int send(const char* msg, size_t length) { return stream_.send(msg, length); } + int send(const std::string& msg) + { return send(msg.c_str(), msg.size()); } + int send(const std::vector& msg) { return stream_.send(msg); }