开发者

Where is boost::asio::windows::stream_handle in boost 1.46.1?

开发者 https://www.devze.com 2023-02-27 19:47 出处:网络
Once uppon a time we had boost code like: typedef BoostAsioPipe pipe; #elif defined(BOOST_POSIX_API) typedef boost::asio::posix::stream_descriptor pipe;

Once uppon a time we had boost code like:

typedef BoostAsioPipe pipe;
#elif defined(BOOST_POSIX_API)
typedef boost::asio::posix::stream_descriptor pipe;
#elif defined(BOOST_WINDOWS_API)
typedef boost::asio::windows::stream_handle pipe;
#else
#   error "Unsupported platform."
#endif

but now, for example on windows compiler tralls us that stream_handle is not a part of boost::asio... so where is it now? (and is stream_descriptor in the same place or it also moved)?

Update

Stupid me: there is something like boost::asio::windows::pipe now but compiler gives C3083开发者_JAVA技巧

#elif defined(BOOST_WINDOWS_API)
    typedef boost::asio::windows::pipe  pipe;
#else


Is this what you want? (from http://think-async.com/Asio/asio-1.4.8/doc/asio/overview/windows/stream_handle.html)

Windows random-access HANDLEs are only available at compile time when targeting Windows and only when the I/O completion port backend is used (which is the default). A program may test for the macro BOOST_ASIO_HAS_WINDOWS_STREAM_HANDLE to determine whether they are supported. (also valid for BOOST_ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE)

0

精彩评论

暂无评论...
验证码 换一张
取 消