Opened 5 years ago
#13292 new Bugs
Using Boost.Asio's POSIX-specific features makes programs not compile
Reported by: | Owned by: | chris_kohlhoff | |
---|---|---|---|
Milestone: | To Be Determined | Component: | asio |
Version: | Boost 1.63.0 | Severity: | Showstopper |
Keywords: | Cc: |
Description
When using ASIO I get the following error message upon trying to compile on POSIX:
In file included from /usr/include/boost/asio/basic_socket_iostream.hpp:24:0, from /usr/include/boost/asio.hpp:29, from boost_bug.cpp:1: /usr/include/boost/asio/basic_socket_streambuf.hpp: In instantiation of ‘boost::asio::basic_socket_streambuf<Protocol, StreamSocketService, Time, TimeTraits, TimerService>* boost::asio::basic_socket_streambuf<Protocol, StreamSocketService, Time, TimeTraits, TimerService>::connect(T ...) [with T = {const char*}; Protocol = boost::asio::local::stream_protocol; StreamSocketService = boost::asio::stream_socket_service<boost::asio::local::stream_protocol>; Time = boost::posix_time::ptime; TimeTraits = boost::asio::time_traits<boost::posix_time::ptime>; TimerService = boost::asio::deadline_timer_service<boost::posix_time::ptime, boost::asio::time_traits<boost::posix_time::ptime> >]’: /usr/include/boost/asio/basic_socket_iostream.hpp:167:32: required from ‘boost::asio::basic_socket_iostream<Protocol, StreamSocketService, Time, TimeTraits, TimerService>::basic_socket_iostream(T ...) [with T = {const char*}; Protocol = boost::asio::local::stream_protocol; StreamSocketService = boost::asio::stream_socket_service<boost::asio::local::stream_protocol>; Time = boost::posix_time::ptime; TimeTraits = boost::asio::time_traits<boost::posix_time::ptime>; TimerService = boost::asio::deadline_timer_service<boost::posix_time::ptime, boost::asio::time_traits<boost::posix_time::ptime> >]’ boost_bug.cpp:4:74: required from here /usr/include/boost/asio/basic_socket_streambuf.hpp:204:41: error: no type named ‘resolver’ in ‘class boost::asio::local::stream_protocol’ typedef typename Protocol::resolver resolver_type;
The following is an example source file that reproduces the bug:
#include <boost/asio.hpp> int main() { boost::asio::local::stream_protocol::iostream stream("/tmp/test_sock"); }
Note:
See TracTickets
for help on using tickets.