I want to read from standard input (in terms of c++, std::cin) with boost asio function async_read(). The following code does not compile and gives me a very long error message due to instantiation error. Can someone answer, how do I read from stdin asynchronously using this function?
char buf[64];
boost::asio::async_read(std::cin, boost::asio::buffer(buf),
[](const boost::system::error_code &ec, std::size_t size){});
Edit: I know there is a similar question already asked here Using boost::asio::async_read with stdin?, however it is not clear to me in which way the marked answer relates to the question