Existiert die Memberfunktion „boost::asio::readable_pipe::read()“?

Post a reply

Smilies
:) :( :oops: :chelo: :roll: :wink: :muza: :sorry: :angel: :read: *x) :clever:
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Existiert die Memberfunktion „boost::asio::readable_pipe::read()“?

by Guest » 18 Jan 2025, 19:07

Ich versuche, Beispielcode zu erstellen, der auf der Boost-Website gezeigt wird, aber es wird eine Mitgliedsfunktion verwendet, die anscheinend nicht Teil von Boost ist:

Code: Select all

#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

int main()
{
using namespace boost;
using namespace boost::process::v2;

asio::io_context ctx;
asio::readable_pipe rp{ctx};

boost::process::v2::process proc(ctx, "/usr/bin/g++", {"--version"}, process_stdio{{ /* in to default */}, rp, { /* err to default */ }});
std::string output;

system::error_code ec;
rp.read(asio::dynamic_buffer(output), ec);   //

Top