diff options
Diffstat (limited to 'boost/asio/basic_socket_iostream.hpp')
-rw-r--r-- | boost/asio/basic_socket_iostream.hpp | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/boost/asio/basic_socket_iostream.hpp b/boost/asio/basic_socket_iostream.hpp index a5f8e0223a..7a7cab9c93 100644 --- a/boost/asio/basic_socket_iostream.hpp +++ b/boost/asio/basic_socket_iostream.hpp @@ -2,7 +2,7 @@ // basic_socket_iostream.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2018 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) @@ -125,15 +125,18 @@ protected: // Forward declaration with defaulted arguments. template <typename Protocol BOOST_ASIO_SVC_TPARAM_DEF1(= stream_socket_service<Protocol>), -#if defined(BOOST_ASIO_HAS_BOOST_DATE_TIME) +#if defined(BOOST_ASIO_HAS_BOOST_DATE_TIME) \ + && defined(BOOST_ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM) typename Clock = boost::posix_time::ptime, typename WaitTraits = time_traits<Clock> BOOST_ASIO_SVC_TPARAM1_DEF2(= deadline_timer_service<Clock, WaitTraits>)> -#else +#else // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME) + // && defined(BOOST_ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM) typename Clock = chrono::steady_clock, typename WaitTraits = wait_traits<Clock> BOOST_ASIO_SVC_TPARAM1_DEF1(= steady_timer::service_type)> -#endif +#endif // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME) + // && defined(BOOST_ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM) class basic_socket_iostream; #endif // !defined(BOOST_ASIO_BASIC_SOCKET_IOSTREAM_FWD_DECL) @@ -155,11 +158,14 @@ class basic_socket_iostream private: // These typedefs are intended keep this class's implementation independent // of whether it's using Boost.DateClock, Boost.Chrono or std::chrono. -#if defined(BOOST_ASIO_HAS_BOOST_DATE_TIME) +#if defined(BOOST_ASIO_HAS_BOOST_DATE_TIME) \ + && defined(BOOST_ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM) typedef WaitTraits traits_helper; -#else +#else // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME) + // && defined(BOOST_ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM) typedef detail::chrono_time_traits<Clock, WaitTraits> traits_helper; -#endif +#endif // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME) + // && defined(BOOST_ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM) public: /// The protocol type. |