diff --git a/asio/include/asio/basic_socket.hpp b/asio/include/asio/basic_socket.hpp index 5282906f..b6f6f6fd 100644 --- a/asio/include/asio/basic_socket.hpp +++ b/asio/include/asio/basic_socket.hpp @@ -77,8 +77,10 @@ public: /// The endpoint type. typedef typename Protocol::endpoint endpoint_type; +#if !defined(ASIO_NO_EXTENSIONS) /// A basic_socket is always the lowest layer. typedef basic_socket lowest_layer_type; +#endif // !defined(ASIO_NO_EXTENSIONS) /// Construct a basic_socket without opening it. /** @@ -278,6 +280,7 @@ public: } #endif // defined(ASIO_ENABLE_OLD_SERVICES) +#if !defined(ASIO_NO_EXTENSIONS) /// Get a reference to the lowest layer. /** * This function returns a reference to the lowest layer in a stack of @@ -305,6 +308,7 @@ public: { return *this; } +#endif // !defined(ASIO_NO_EXTENSIONS) /// Open the socket using the specified protocol. /** diff --git a/asio/include/asio/basic_socket_acceptor.hpp b/asio/include/asio/basic_socket_acceptor.hpp index df4fb238..d1ace2f1 100644 --- a/asio/include/asio/basic_socket_acceptor.hpp +++ b/asio/include/asio/basic_socket_acceptor.hpp @@ -1067,6 +1067,7 @@ public: #endif // defined(ASIO_ENABLE_OLD_SERVICES) } +#if !defined(ASIO_NO_EXTENSIONS) /// Accept a new connection. /** * This function is used to accept a new connection from a peer into the @@ -1350,6 +1351,7 @@ public: return init.result.get(); #endif // defined(ASIO_ENABLE_OLD_SERVICES) } +#endif // !defined(ASIO_NO_EXTENSIONS) #if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) /// Accept a new connection. diff --git a/asio/include/asio/io_context.hpp b/asio/include/asio/io_context.hpp index 9aa14afd..03d7701b 100644 --- a/asio/include/asio/io_context.hpp +++ b/asio/include/asio/io_context.hpp @@ -161,7 +161,9 @@ public: class service; +#if !defined(ASIO_NO_EXTENSIONS) class strand; +#endif // !defined(ASIO_NO_EXTENSIONS) /// The type used to count the number of handlers executed by the context. typedef std::size_t count_type; @@ -819,8 +821,10 @@ asio::detail::service_id service_base::id; // If both io_context.hpp and strand.hpp have been included, automatically // include the header file needed for the io_context::strand class. -#if defined(ASIO_STRAND_HPP) -# include "asio/io_context_strand.hpp" -#endif // defined(ASIO_STRAND_HPP) +#if !defined(ASIO_NO_EXTENSIONS) +# if defined(ASIO_STRAND_HPP) +# include "asio/io_context_strand.hpp" +# endif // defined(ASIO_STRAND_HPP) +#endif // !defined(ASIO_NO_EXTENSIONS) #endif // ASIO_IO_CONTEXT_HPP diff --git a/asio/include/asio/io_context_strand.hpp b/asio/include/asio/io_context_strand.hpp index 3b4b3c97..53a6c469 100644 --- a/asio/include/asio/io_context_strand.hpp +++ b/asio/include/asio/io_context_strand.hpp @@ -16,6 +16,9 @@ #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) #include "asio/detail/config.hpp" + +#if !defined(ASIO_NO_EXTENSIONS) + #include "asio/async_result.hpp" #include "asio/detail/handler_type_requirements.hpp" #include "asio/detail/strand_service.hpp" @@ -374,4 +377,6 @@ private: #include "asio/detail/pop_options.hpp" +#endif // !defined(ASIO_NO_EXTENSIONS) + #endif // ASIO_IO_CONTEXT_STRAND_HPP diff --git a/asio/include/asio/strand.hpp b/asio/include/asio/strand.hpp index 751ef35e..c70162ba 100644 --- a/asio/include/asio/strand.hpp +++ b/asio/include/asio/strand.hpp @@ -277,8 +277,10 @@ private: // If both io_context.hpp and strand.hpp have been included, automatically // include the header file needed for the io_context::strand class. -#if defined(ASIO_IO_CONTEXT_HPP) -# include "asio/io_context_strand.hpp" -#endif // defined(ASIO_IO_CONTEXT_HPP) +#if !defined(ASIO_NO_EXTENSIONS) +# if defined(ASIO_IO_CONTEXT_HPP) +# include "asio/io_context_strand.hpp" +# endif // defined(ASIO_IO_CONTEXT_HPP) +#endif // !defined(ASIO_NO_EXTENSIONS) #endif // ASIO_STRAND_HPP