g++ index.cpp -o main
In file included from /usr/include/boost/asio/write.hpp:1246,
from /usr/include/boost/asio/buffered_write_stream.hpp:28,
from /usr/include/boost/asio/buffered_stream.hpp:22,
from /usr/include/boost/asio.hpp:43,
from index.cpp:1:
/usr/include/boost/asio/impl/write.hpp: В конкретизации «std::size_t boost::asio::detail::write_buffer_sequence(SyncWriteStream&, const ConstBufferSequence&, const ConstBufferIterator&, CompletionCondition, boost::system::error_code&) [with SyncWriteStream = int(int, int, int); ConstBufferSequence = boost::asio::const_buffers_1; ConstBufferIterator = const boost::asio::const_buffer*; CompletionCondition = boost::asio::detail::transfer_all_t; std::size_t = long unsigned int]»:
/usr/include/boost/asio/impl/write.hpp:70:39: требуемый из «std::size_t boost::asio::write(SyncWriteStream&, const ConstBufferSequence&, CompletionCondition, boost::system::error_code&, typename std::enable_if<boost::asio::is_const_buffer_sequence<ConstBufferSequence>::value>::type*) [with SyncWriteStream = int(int, int, int); ConstBufferSequence = boost::asio::const_buffers_1; CompletionCondition = boost::asio::detail::transfer_all_t; std::size_t = long unsigned int; typename std::enable_if<boost::asio::is_const_buffer_sequence<ConstBufferSequence>::value>::type = void]»
/usr/include/boost/asio/impl/write.hpp:82:40: требуемый из «std::size_t boost::asio::write(SyncWriteStream&, const ConstBufferSequence&, typename std::enable_if<boost::asio::is_const_buffer_sequence<ConstBufferSequence>::value>::type*) [with SyncWriteStream = int(int, int, int); ConstBufferSequence = boost::asio::const_buffers_1; std::size_t = long unsigned int; typename std::enable_if<boost::asio::is_const_buffer_sequence<ConstBufferSequence>::value>::type = void]»
index.cpp:36:53: required from here
/usr/include/boost/asio/impl/write.hpp:54:23: ошибка: запрос элемента «write_some» в «s», имеющего не классовый тип «int(int, int, int)»
54 | tmp.consume(s.write_some(tmp.prepare(max_size), ec));
| ~~^~~~~~~~~~