X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ceph%2Fsrc%2Fboost%2Flibs%2Fasio%2Ftest%2Fwindows%2Fstream_handle.cpp;h=af44e6a1f2a0d8c10b541613b09d187ee2694531;hb=b32b81446b3b05102be0267e79203f59329c1d97;hp=925e573b99ca7ad75936b6630a7d94e824259a53;hpb=215dd7151453fae88e6f968c975b6ce309d42dcf;p=ceph.git diff --git a/ceph/src/boost/libs/asio/test/windows/stream_handle.cpp b/ceph/src/boost/libs/asio/test/windows/stream_handle.cpp index 925e573b9..af44e6a1f 100644 --- a/ceph/src/boost/libs/asio/test/windows/stream_handle.cpp +++ b/ceph/src/boost/libs/asio/test/windows/stream_handle.cpp @@ -2,7 +2,7 @@ // stream_handle.cpp // ~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -16,7 +16,7 @@ // Test that header file is self-contained. #include -#include +#include #include "../archetypes/async_result.hpp" #include "../unit_test.hpp" @@ -46,7 +46,7 @@ void test() try { - io_service ios; + io_context ioc; char mutable_char_buffer[128] = ""; const char const_char_buffer[128] = ""; archetypes::lazy_handler lazy; @@ -54,9 +54,9 @@ void test() // basic_stream_handle constructors. - win::stream_handle handle1(ios); + win::stream_handle handle1(ioc); HANDLE native_handle1 = INVALID_HANDLE_VALUE; - win::stream_handle handle2(ios, native_handle1); + win::stream_handle handle2(ioc, native_handle1); #if defined(BOOST_ASIO_HAS_MOVE) win::stream_handle handle3(std::move(handle2)); @@ -65,14 +65,19 @@ void test() // basic_stream_handle operators. #if defined(BOOST_ASIO_HAS_MOVE) - handle1 = win::stream_handle(ios); + handle1 = win::stream_handle(ioc); handle1 = std::move(handle2); #endif // defined(BOOST_ASIO_HAS_MOVE) // basic_io_object functions. - io_service& ios_ref = handle1.get_io_service(); - (void)ios_ref; +#if !defined(BOOST_ASIO_NO_DEPRECATED) + io_context& ioc_ref = handle1.get_io_context(); + (void)ioc_ref; +#endif // !defined(BOOST_ASIO_NO_DEPRECATED) + + io_context::executor_type ex = handle1.get_executor(); + (void)ex; // basic_handle functions. @@ -94,12 +99,9 @@ void test() handle1.close(); handle1.close(ec); - win::stream_handle::native_type native_handle3 = handle1.native(); - (void)native_handle3; - - win::stream_handle::native_handle_type native_handle4 + win::stream_handle::native_handle_type native_handle3 = handle1.native_handle(); - (void)native_handle4; + (void)native_handle3; handle1.cancel(); handle1.cancel(ec);