diff -ur boost_1_36_0/boost/asio/basic_datagram_socket.hpp boost_1_36_0_exceptions/boost/asio/basic_datagram_socket.hpp --- boost_1_36_0/boost/asio/basic_datagram_socket.hpp 2008-03-12 07:12:08.000000000 -0700 +++ boost_1_36_0_exceptions/boost/asio/basic_datagram_socket.hpp 2008-10-20 22:50:35.000000000 -0700 @@ -152,6 +152,7 @@ * buffers in one go, and how to use it with arrays, boost::array or * std::vector. */ +#ifndef BOOST_NO_EXCEPTIONS template std::size_t send(const ConstBufferSequence& buffers) { @@ -160,6 +161,7 @@ boost::asio::detail::throw_error(ec); return s; } +#endif /// Send some data on a connected socket. /** @@ -178,6 +180,7 @@ * @note The send operation can only be used with a connected socket. Use * the send_to function to send data on an unconnected datagram socket. */ +#ifndef BOOST_NO_EXCEPTIONS template std::size_t send(const ConstBufferSequence& buffers, socket_base::message_flags flags) @@ -188,6 +191,7 @@ boost::asio::detail::throw_error(ec); return s; } +#endif /// Send some data on a connected socket. /** @@ -316,6 +320,7 @@ * buffers in one go, and how to use it with arrays, boost::array or * std::vector. */ +#ifndef BOOST_NO_EXCEPTIONS template std::size_t send_to(const ConstBufferSequence& buffers, const endpoint_type& destination) @@ -326,6 +331,7 @@ boost::asio::detail::throw_error(ec); return s; } +#endif /// Send a datagram to the specified endpoint. /** @@ -343,6 +349,7 @@ * * @throws boost::system::system_error Thrown on failure. */ +#ifndef BOOST_NO_EXCEPTIONS template std::size_t send_to(const ConstBufferSequence& buffers, const endpoint_type& destination, socket_base::message_flags flags) @@ -353,6 +360,7 @@ boost::asio::detail::throw_error(ec); return s; } +#endif /// Send a datagram to the specified endpoint. /** @@ -484,6 +492,7 @@ * multiple buffers in one go, and how to use it with arrays, boost::array or * std::vector. */ +#ifndef BOOST_NO_EXCEPTIONS template std::size_t receive(const MutableBufferSequence& buffers) { @@ -493,6 +502,7 @@ boost::asio::detail::throw_error(ec); return s; } +#endif /// Receive some data on a connected socket. /** @@ -512,6 +522,7 @@ * the receive_from function to receive data on an unconnected datagram * socket. */ +#ifndef BOOST_NO_EXCEPTIONS template std::size_t receive(const MutableBufferSequence& buffers, socket_base::message_flags flags) @@ -522,6 +533,7 @@ boost::asio::detail::throw_error(ec); return s; } +#endif /// Receive some data on a connected socket. /** @@ -651,6 +663,7 @@ * multiple buffers in one go, and how to use it with arrays, boost::array or * std::vector. */ +#ifndef BOOST_NO_EXCEPTIONS template std::size_t receive_from(const MutableBufferSequence& buffers, endpoint_type& sender_endpoint) @@ -661,6 +674,7 @@ boost::asio::detail::throw_error(ec); return s; } +#endif /// Receive a datagram with the endpoint of the sender. /** @@ -678,6 +692,7 @@ * * @throws boost::system::system_error Thrown on failure. */ +#ifndef BOOST_NO_EXCEPTIONS template std::size_t receive_from(const MutableBufferSequence& buffers, endpoint_type& sender_endpoint, socket_base::message_flags flags) @@ -688,6 +703,7 @@ boost::asio::detail::throw_error(ec); return s; } +#endif /// Receive a datagram with the endpoint of the sender. /** diff -ur boost_1_36_0/boost/asio/basic_deadline_timer.hpp boost_1_36_0_exceptions/boost/asio/basic_deadline_timer.hpp --- boost_1_36_0/boost/asio/basic_deadline_timer.hpp 2008-03-12 07:12:08.000000000 -0700 +++ boost_1_36_0_exceptions/boost/asio/basic_deadline_timer.hpp 2008-10-20 22:51:19.000000000 -0700 @@ -154,6 +154,7 @@ * @param expiry_time The expiry time to be used for the timer, expressed * as an absolute time. */ +#ifndef BOOST_NO_EXCEPTIONS basic_deadline_timer(boost::asio::io_service& io_service, const time_type& expiry_time) : basic_io_object(io_service) @@ -162,6 +163,7 @@ this->service.expires_at(this->implementation, expiry_time, ec); boost::asio::detail::throw_error(ec); } +#endif /// Constructor to set a particular expiry time relative to now. /** @@ -173,6 +175,7 @@ * @param expiry_time The expiry time to be used for the timer, relative to * now. */ +#ifndef BOOST_NO_EXCEPTIONS basic_deadline_timer(boost::asio::io_service& io_service, const duration_type& expiry_time) : basic_io_object(io_service) @@ -181,6 +184,7 @@ this->service.expires_from_now(this->implementation, expiry_time, ec); boost::asio::detail::throw_error(ec); } +#endif /// Cancel any asynchronous operations that are waiting on the timer. /** @@ -194,6 +198,7 @@ * * @throws boost::system::system_error Thrown on failure. */ +#ifndef BOOST_NO_EXCEPTIONS std::size_t cancel() { boost::system::error_code ec; @@ -201,6 +206,7 @@ boost::asio::detail::throw_error(ec); return s; } +#endif /// Cancel any asynchronous operations that are waiting on the timer. /** @@ -241,6 +247,7 @@ * * @throws boost::system::system_error Thrown on failure. */ +#ifndef BOOST_NO_EXCEPTIONS std::size_t expires_at(const time_type& expiry_time) { boost::system::error_code ec; @@ -249,6 +256,7 @@ boost::asio::detail::throw_error(ec); return s; } +#endif /// Set the timer's expiry time as an absolute time. /** @@ -290,6 +298,7 @@ * * @throws boost::system::system_error Thrown on failure. */ +#ifndef BOOST_NO_EXCEPTIONS std::size_t expires_from_now(const duration_type& expiry_time) { boost::system::error_code ec; @@ -298,6 +307,7 @@ boost::asio::detail::throw_error(ec); return s; } +#endif /// Set the timer's expiry time relative to now. /** @@ -325,12 +335,14 @@ * * @throws boost::system::system_error Thrown on failure. */ +#ifndef BOOST_NO_EXCEPTIONS void wait() { boost::system::error_code ec; this->service.wait(this->implementation, ec); boost::asio::detail::throw_error(ec); } +#endif /// Perform a blocking wait on the timer. /** diff -ur boost_1_36_0/boost/asio/basic_socket.hpp boost_1_36_0_exceptions/boost/asio/basic_socket.hpp --- boost_1_36_0/boost/asio/basic_socket.hpp 2008-07-03 06:05:33.000000000 -0700 +++ boost_1_36_0_exceptions/boost/asio/basic_socket.hpp 2008-10-20 22:44:35.000000000 -0700 @@ -79,6 +79,7 @@ * * @throws boost::system::system_error Thrown on failure. */ +#ifndef BOOST_NO_EXCEPTIONS basic_socket(boost::asio::io_service& io_service, const protocol_type& protocol) : basic_io_object(io_service) @@ -87,6 +88,7 @@ this->service.open(this->implementation, protocol, ec); boost::asio::detail::throw_error(ec); } +#endif /// Construct a basic_socket, opening it and binding it to the given local /// endpoint. @@ -103,6 +105,7 @@ * * @throws boost::system::system_error Thrown on failure. */ +#ifndef BOOST_NO_EXCEPTIONS basic_socket(boost::asio::io_service& io_service, const endpoint_type& endpoint) : basic_io_object(io_service) @@ -113,6 +116,7 @@ this->service.bind(this->implementation, endpoint, ec); boost::asio::detail::throw_error(ec); } +#endif /// Construct a basic_socket on an existing native socket. /** @@ -127,6 +131,7 @@ * * @throws boost::system::system_error Thrown on failure. */ +#ifndef BOOST_NO_EXCEPTIONS basic_socket(boost::asio::io_service& io_service, const protocol_type& protocol, const native_type& native_socket) : basic_io_object(io_service) @@ -135,6 +140,7 @@ this->service.assign(this->implementation, protocol, native_socket, ec); boost::asio::detail::throw_error(ec); } +#endif /// Get a reference to the lowest layer. /** @@ -164,12 +170,14 @@ * socket.open(boost::asio::ip::tcp::v4()); * @endcode */ +#ifndef BOOST_NO_EXCEPTIONS void open(const protocol_type& protocol = protocol_type()) { boost::system::error_code ec; this->service.open(this->implementation, protocol, ec); boost::asio::detail::throw_error(ec); } +#endif /// Open the socket using the specified protocol. /** @@ -206,12 +214,14 @@ * * @throws boost::system::system_error Thrown on failure. */ +#ifndef BOOST_NO_EXCEPTIONS void assign(const protocol_type& protocol, const native_type& native_socket) { boost::system::error_code ec; this->service.assign(this->implementation, protocol, native_socket, ec); boost::asio::detail::throw_error(ec); } +#endif /// Assign an existing native socket to the socket. /* @@ -247,12 +257,14 @@ * @note For portable behaviour with respect to graceful closure of a * connected socket, call shutdown() before closing the socket. */ +#ifndef BOOST_NO_EXCEPTIONS void close() { boost::system::error_code ec; this->service.close(this->implementation, ec); boost::asio::detail::throw_error(ec); } +#endif /// Close the socket. /** @@ -334,12 +346,14 @@ "operation_not_supported when used on Windows XP, Windows Server 2003, " "or earlier. Consult documentation for details.")) #endif +#ifndef BOOST_NO_EXCEPTIONS void cancel() { boost::system::error_code ec; this->service.cancel(this->implementation, ec); boost::asio::detail::throw_error(ec); } +#endif /// Cancel all asynchronous operations associated with the socket. /** @@ -397,6 +411,7 @@ * * @throws boost::system::system_error Thrown on failure. */ +#ifndef BOOST_NO_EXCEPTIONS bool at_mark() const { boost::system::error_code ec; @@ -404,6 +419,7 @@ boost::asio::detail::throw_error(ec); return b; } +#endif /// Determine whether the socket is at the out-of-band data mark. /** @@ -430,6 +446,7 @@ * * @throws boost::system::system_error Thrown on failure. */ +#ifndef BOOST_NO_EXCEPTIONS std::size_t available() const { boost::system::error_code ec; @@ -437,6 +454,7 @@ boost::asio::detail::throw_error(ec); return s; } +#endif /// Determine the number of bytes available for reading. /** @@ -471,12 +489,14 @@ * boost::asio::ip::tcp::v4(), 12345)); * @endcode */ +#ifndef BOOST_NO_EXCEPTIONS void bind(const endpoint_type& endpoint) { boost::system::error_code ec; this->service.bind(this->implementation, endpoint, ec); boost::asio::detail::throw_error(ec); } +#endif /// Bind the socket to the given local endpoint. /** @@ -530,6 +550,7 @@ * socket.connect(endpoint); * @endcode */ +#ifndef BOOST_NO_EXCEPTIONS void connect(const endpoint_type& peer_endpoint) { boost::system::error_code ec; @@ -541,6 +562,7 @@ this->service.connect(this->implementation, peer_endpoint, ec); boost::asio::detail::throw_error(ec); } +#endif /// Connect the socket to the specified endpoint. /** @@ -678,6 +700,7 @@ * socket.set_option(option); * @endcode */ +#ifndef BOOST_NO_EXCEPTIONS template void set_option(const SettableSocketOption& option) { @@ -685,6 +708,7 @@ this->service.set_option(this->implementation, option, ec); boost::asio::detail::throw_error(ec); } +#endif /// Set an option on the socket. /** @@ -767,6 +791,7 @@ * bool is_set = option.get(); * @endcode */ +#ifndef BOOST_NO_EXCEPTIONS template void get_option(GettableSocketOption& option) const { @@ -774,6 +799,7 @@ this->service.get_option(this->implementation, option, ec); boost::asio::detail::throw_error(ec); } +#endif /// Get an option from the socket. /** @@ -844,6 +870,7 @@ * std::size_t bytes_readable = command.get(); * @endcode */ +#ifndef BOOST_NO_EXCEPTIONS template void io_control(IoControlCommand& command) { @@ -851,6 +878,7 @@ this->service.io_control(this->implementation, command, ec); boost::asio::detail::throw_error(ec); } +#endif /// Perform an IO control command on the socket. /** @@ -901,6 +929,7 @@ * boost::asio::ip::tcp::endpoint endpoint = socket.local_endpoint(); * @endcode */ +#ifndef BOOST_NO_EXCEPTIONS endpoint_type local_endpoint() const { boost::system::error_code ec; @@ -908,6 +937,7 @@ boost::asio::detail::throw_error(ec); return ep; } +#endif /// Get the local endpoint of the socket. /** @@ -950,6 +980,7 @@ * boost::asio::ip::tcp::endpoint endpoint = socket.remote_endpoint(); * @endcode */ +#ifndef BOOST_NO_EXCEPTIONS endpoint_type remote_endpoint() const { boost::system::error_code ec; @@ -957,6 +988,7 @@ boost::asio::detail::throw_error(ec); return ep; } +#endif /// Get the remote endpoint of the socket. /** @@ -1001,12 +1033,14 @@ * socket.shutdown(boost::asio::ip::tcp::socket::shutdown_send); * @endcode */ +#ifndef BOOST_NO_EXCEPTIONS void shutdown(shutdown_type what) { boost::system::error_code ec; this->service.shutdown(this->implementation, what, ec); boost::asio::detail::throw_error(ec); } +#endif /// Disable sends or receives on the socket. /** diff -ur boost_1_36_0/boost/asio/basic_socket_acceptor.hpp boost_1_36_0_exceptions/boost/asio/basic_socket_acceptor.hpp --- boost_1_36_0/boost/asio/basic_socket_acceptor.hpp 2008-03-12 07:12:08.000000000 -0700 +++ boost_1_36_0_exceptions/boost/asio/basic_socket_acceptor.hpp 2008-10-20 22:46:38.000000000 -0700 @@ -90,6 +90,7 @@ * * @throws boost::system::system_error Thrown on failure. */ +#ifndef BOOST_NO_EXCEPTIONS basic_socket_acceptor(boost::asio::io_service& io_service, const protocol_type& protocol) : basic_io_object(io_service) @@ -98,6 +99,7 @@ this->service.open(this->implementation, protocol, ec); boost::asio::detail::throw_error(ec); } +#endif /// Construct an acceptor opened on the given endpoint. /** @@ -126,6 +128,7 @@ * acceptor.listen(listen_backlog); * @endcode */ +#ifndef BOOST_NO_EXCEPTIONS basic_socket_acceptor(boost::asio::io_service& io_service, const endpoint_type& endpoint, bool reuse_addr = true) : basic_io_object(io_service) @@ -145,6 +148,7 @@ socket_base::max_connections, ec); boost::asio::detail::throw_error(ec); } +#endif /// Construct a basic_socket_acceptor on an existing native acceptor. /** @@ -161,6 +165,7 @@ * * @throws boost::system::system_error Thrown on failure. */ +#ifndef BOOST_NO_EXCEPTIONS basic_socket_acceptor(boost::asio::io_service& io_service, const protocol_type& protocol, const native_type& native_acceptor) : basic_io_object(io_service) @@ -169,6 +174,7 @@ this->service.assign(this->implementation, protocol, native_acceptor, ec); boost::asio::detail::throw_error(ec); } +#endif /// Open the acceptor using the specified protocol. /** @@ -185,12 +191,14 @@ * acceptor.open(boost::asio::ip::tcp::v4()); * @endcode */ +#ifndef BOOST_NO_EXCEPTIONS void open(const protocol_type& protocol = protocol_type()) { boost::system::error_code ec; this->service.open(this->implementation, protocol, ec); boost::asio::detail::throw_error(ec); } +#endif /// Open the acceptor using the specified protocol. /** @@ -228,12 +236,14 @@ * * @throws boost::system::system_error Thrown on failure. */ +#ifndef BOOST_NO_EXCEPTIONS void assign(const protocol_type& protocol, const native_type& native_acceptor) { boost::system::error_code ec; this->service.assign(this->implementation, protocol, native_acceptor, ec); boost::asio::detail::throw_error(ec); } +#endif /// Assigns an existing native acceptor to the acceptor. /* @@ -275,12 +285,14 @@ * acceptor.bind(boost::asio::ip::tcp::endpoint(12345)); * @endcode */ +#ifndef BOOST_NO_EXCEPTIONS void bind(const endpoint_type& endpoint) { boost::system::error_code ec; this->service.bind(this->implementation, endpoint, ec); boost::asio::detail::throw_error(ec); } +#endif /// Bind the acceptor to the given local endpoint. /** @@ -320,12 +332,14 @@ * * @throws boost::system::system_error Thrown on failure. */ +#ifndef BOOST_NO_EXCEPTIONS void listen(int backlog = socket_base::max_connections) { boost::system::error_code ec; this->service.listen(this->implementation, backlog, ec); boost::asio::detail::throw_error(ec); } +#endif /// Place the acceptor into the state where it will listen for new /// connections. @@ -364,12 +378,14 @@ * * @throws boost::system::system_error Thrown on failure. */ +#ifndef BOOST_NO_EXCEPTIONS void close() { boost::system::error_code ec; this->service.close(this->implementation, ec); boost::asio::detail::throw_error(ec); } +#endif /// Close the acceptor. /** @@ -417,12 +433,14 @@ * * @throws boost::system::system_error Thrown on failure. */ +#ifndef BOOST_NO_EXCEPTIONS void cancel() { boost::system::error_code ec; this->service.cancel(this->implementation, ec); boost::asio::detail::throw_error(ec); } +#endif /// Cancel all asynchronous operations associated with the acceptor. /** @@ -458,6 +476,7 @@ * acceptor.set_option(option); * @endcode */ +#ifndef BOOST_NO_EXCEPTIONS template void set_option(const SettableSocketOption& option) { @@ -465,6 +484,7 @@ this->service.set_option(this->implementation, option, ec); boost::asio::detail::throw_error(ec); } +#endif /// Set an option on the acceptor. /** @@ -521,6 +541,7 @@ * bool is_set = option.get(); * @endcode */ +#ifndef BOOST_NO_EXCEPTIONS template void get_option(GettableSocketOption& option) { @@ -528,6 +549,7 @@ this->service.get_option(this->implementation, option, ec); boost::asio::detail::throw_error(ec); } +#endif /// Get an option from the acceptor. /** @@ -578,6 +600,7 @@ * boost::asio::ip::tcp::endpoint endpoint = acceptor.local_endpoint(); * @endcode */ +#ifndef BOOST_NO_EXCEPTIONS endpoint_type local_endpoint() const { boost::system::error_code ec; @@ -585,6 +608,7 @@ boost::asio::detail::throw_error(ec); return ep; } +#endif /// Get the local endpoint of the acceptor. /** @@ -631,6 +655,7 @@ * acceptor.accept(socket); * @endcode */ +#ifndef BOOST_NO_EXCEPTIONS template void accept(basic_socket& peer) { @@ -638,6 +663,7 @@ this->service.accept(this->implementation, peer, 0, ec); boost::asio::detail::throw_error(ec); } +#endif /// Accept a new connection. /** @@ -738,6 +764,7 @@ * acceptor.accept(socket, endpoint); * @endcode */ +#ifndef BOOST_NO_EXCEPTIONS template void accept(basic_socket& peer, endpoint_type& peer_endpoint) @@ -746,6 +773,7 @@ this->service.accept(this->implementation, peer, &peer_endpoint, ec); boost::asio::detail::throw_error(ec); } +#endif /// Accept a new connection and obtain the endpoint of the peer /** diff -ur boost_1_36_0/boost/asio/basic_stream_socket.hpp boost_1_36_0_exceptions/boost/asio/basic_stream_socket.hpp --- boost_1_36_0/boost/asio/basic_stream_socket.hpp 2008-03-12 07:12:08.000000000 -0700 +++ boost_1_36_0_exceptions/boost/asio/basic_stream_socket.hpp 2008-10-20 22:47:29.000000000 -0700 @@ -156,6 +156,7 @@ * buffers in one go, and how to use it with arrays, boost::array or * std::vector. */ +#ifndef BOOST_NO_EXCEPTIONS template std::size_t send(const ConstBufferSequence& buffers) { @@ -165,6 +166,7 @@ boost::asio::detail::throw_error(ec); return s; } +#endif /// Send some data on the socket. /** @@ -193,6 +195,7 @@ * buffers in one go, and how to use it with arrays, boost::array or * std::vector. */ +#ifndef BOOST_NO_EXCEPTIONS template std::size_t send(const ConstBufferSequence& buffers, socket_base::message_flags flags) @@ -203,6 +206,7 @@ boost::asio::detail::throw_error(ec); return s; } +#endif /// Send some data on the socket. /** @@ -342,6 +346,7 @@ * multiple buffers in one go, and how to use it with arrays, boost::array or * std::vector. */ +#ifndef BOOST_NO_EXCEPTIONS template std::size_t receive(const MutableBufferSequence& buffers) { @@ -350,6 +355,7 @@ boost::asio::detail::throw_error(ec); return s; } +#endif /// Receive some data on the socket. /** @@ -381,6 +387,7 @@ * multiple buffers in one go, and how to use it with arrays, boost::array or * std::vector. */ +#ifndef BOOST_NO_EXCEPTIONS template std::size_t receive(const MutableBufferSequence& buffers, socket_base::message_flags flags) @@ -391,6 +398,7 @@ boost::asio::detail::throw_error(ec); return s; } +#endif /// Receive some data on a connected socket. /** @@ -533,6 +541,7 @@ * buffers in one go, and how to use it with arrays, boost::array or * std::vector. */ +#ifndef BOOST_NO_EXCEPTIONS template std::size_t write_some(const ConstBufferSequence& buffers) { @@ -541,6 +550,7 @@ boost::asio::detail::throw_error(ec); return s; } +#endif /// Write some data to the socket. /** @@ -635,6 +645,7 @@ * buffers in one go, and how to use it with arrays, boost::array or * std::vector. */ +#ifndef BOOST_NO_EXCEPTIONS template std::size_t read_some(const MutableBufferSequence& buffers) { @@ -643,6 +654,7 @@ boost::asio::detail::throw_error(ec); return s; } +#endif /// Read some data from the socket. /** diff -ur boost_1_36_0/boost/asio/detail/resolver_service.hpp boost_1_36_0_exceptions/boost/asio/detail/resolver_service.hpp --- boost_1_36_0/boost/asio/detail/resolver_service.hpp 2008-03-12 07:12:08.000000000 -0700 +++ boost_1_36_0_exceptions/boost/asio/detail/resolver_service.hpp 2009-02-11 21:24:20.000000000 -0800 @@ -321,7 +321,14 @@ public: work_io_service_runner(boost::asio::io_service& io_service) : io_service_(io_service) {} - void operator()() { io_service_.run(); } + void operator()() + { + boost::system::error_code ec; + io_service_.run(ec); +#ifndef BOOST_NO_EXCEPTIONS + throw_error(ec); +#endif + } private: boost::asio::io_service& io_service_; }; diff -ur boost_1_36_0/boost/asio/detail/throw_error.hpp boost_1_36_0_exceptions/boost/asio/detail/throw_error.hpp --- boost_1_36_0/boost/asio/detail/throw_error.hpp 2008-03-12 07:12:08.000000000 -0700 +++ boost_1_36_0_exceptions/boost/asio/detail/throw_error.hpp 2008-10-20 22:40:46.000000000 -0700 @@ -28,6 +28,7 @@ namespace asio { namespace detail { +#ifndef BOOST_NO_EXCEPTIONS inline void throw_error(const boost::system::error_code& err) { if (err) @@ -36,6 +37,7 @@ boost::throw_exception(e); } } +#endif } // namespace detail } // namespace asio diff -ur boost_1_36_0/boost/asio/impl/io_service.ipp boost_1_36_0_exceptions/boost/asio/impl/io_service.ipp --- boost_1_36_0/boost/asio/impl/io_service.ipp 2008-03-12 07:12:08.000000000 -0700 +++ boost_1_36_0_exceptions/boost/asio/impl/io_service.ipp 2008-10-20 22:41:59.000000000 -0700 @@ -52,6 +52,7 @@ delete service_registry_; } +#ifndef BOOST_NO_EXCEPTIONS inline std::size_t io_service::run() { boost::system::error_code ec; @@ -59,12 +60,14 @@ boost::asio::detail::throw_error(ec); return s; } +#endif inline std::size_t io_service::run(boost::system::error_code& ec) { return impl_.run(ec); } +#ifndef BOOST_NO_EXCEPTIONS inline std::size_t io_service::run_one() { boost::system::error_code ec; @@ -72,12 +75,14 @@ boost::asio::detail::throw_error(ec); return s; } +#endif inline std::size_t io_service::run_one(boost::system::error_code& ec) { return impl_.run_one(ec); } +#ifndef BOOST_NO_EXCEPTIONS inline std::size_t io_service::poll() { boost::system::error_code ec; @@ -85,12 +90,14 @@ boost::asio::detail::throw_error(ec); return s; } +#endif inline std::size_t io_service::poll(boost::system::error_code& ec) { return impl_.poll(ec); } +#ifndef BOOST_NO_EXCEPTIONS inline std::size_t io_service::poll_one() { boost::system::error_code ec; @@ -98,6 +105,7 @@ boost::asio::detail::throw_error(ec); return s; } +#endif inline std::size_t io_service::poll_one(boost::system::error_code& ec) { diff -ur boost_1_36_0/boost/asio/impl/read.ipp boost_1_36_0_exceptions/boost/asio/impl/read.ipp --- boost_1_36_0/boost/asio/impl/read.ipp 2008-03-12 07:12:08.000000000 -0700 +++ boost_1_36_0_exceptions/boost/asio/impl/read.ipp 2008-10-20 22:52:27.000000000 -0700 @@ -53,6 +53,7 @@ return total_transferred; } +#ifndef BOOST_NO_EXCEPTIONS template inline std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers) { @@ -72,6 +73,7 @@ boost::asio::detail::throw_error(ec); return bytes_transferred; } +#endif template @@ -93,6 +95,7 @@ } } +#ifndef BOOST_NO_EXCEPTIONS template inline std::size_t read(SyncReadStream& s, boost::asio::basic_streambuf& b) @@ -114,6 +117,7 @@ boost::asio::detail::throw_error(ec); return bytes_transferred; } +#endif namespace detail { diff -ur boost_1_36_0/boost/asio/impl/write.ipp boost_1_36_0_exceptions/boost/asio/impl/write.ipp --- boost_1_36_0/boost/asio/impl/write.ipp 2008-03-12 07:12:08.000000000 -0700 +++ boost_1_36_0_exceptions/boost/asio/impl/write.ipp 2008-10-20 22:51:59.000000000 -0700 @@ -48,6 +48,7 @@ return total_transferred; } +#ifndef BOOST_NO_EXCEPTIONS template inline std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers) { @@ -67,6 +68,7 @@ boost::asio::detail::throw_error(ec); return bytes_transferred; } +#endif template @@ -79,6 +81,7 @@ return bytes_transferred; } +#ifndef BOOST_NO_EXCEPTIONS template inline std::size_t write(SyncWriteStream& s, boost::asio::basic_streambuf& b) @@ -100,6 +103,7 @@ boost::asio::detail::throw_error(ec); return bytes_transferred; } +#endif namespace detail { diff -ur boost_1_36_0/boost/asio/io_service.hpp boost_1_36_0_exceptions/boost/asio/io_service.hpp --- boost_1_36_0/boost/asio/io_service.hpp 2008-07-03 06:05:33.000000000 -0700 +++ boost_1_36_0_exceptions/boost/asio/io_service.hpp 2008-11-03 17:40:45.000000000 -0800 @@ -190,7 +190,9 @@ * @note The poll() function may also be used to dispatch ready handlers, * but without blocking. */ +#ifndef BOOST_NO_EXCEPTIONS std::size_t run(); +#endif /// Run the io_service's event processing loop. /** @@ -223,7 +225,9 @@ * * @throws boost::system::system_error Thrown on failure. */ +#ifndef BOOST_NO_EXCEPTIONS std::size_t run_one(); +#endif /// Run the io_service's event processing loop to execute at most one handler. /** @@ -245,7 +249,9 @@ * * @throws boost::system::system_error Thrown on failure. */ +#ifndef BOOST_NO_EXCEPTIONS std::size_t poll(); +#endif /// Run the io_service's event processing loop to execute ready handlers. /** @@ -267,7 +273,9 @@ * * @throws boost::system::system_error Thrown on failure. */ +#ifndef BOOST_NO_EXCEPTIONS std::size_t poll_one(); +#endif /// Run the io_service's event processing loop to execute one ready handler. /** diff -ur boost_1_36_0/boost/asio/ip/address.hpp boost_1_36_0_exceptions/boost/asio/ip/address.hpp --- boost_1_36_0/boost/asio/ip/address.hpp 2008-03-12 07:12:08.000000000 -0700 +++ boost_1_36_0_exceptions/boost/asio/ip/address.hpp 2008-11-03 08:39:43.000000000 -0800 @@ -120,9 +120,13 @@ { if (type_ != ipv4) { +#ifdef BOOST_NO_EXCEPTIONS + return boost::asio::ip::address_v4(); +#else boost::system::system_error e( boost::asio::error::address_family_not_supported); boost::throw_exception(e); +#endif } return ipv4_address_; } @@ -132,20 +136,26 @@ { if (type_ != ipv6) { +#ifdef BOOST_NO_EXCEPTIONS + return boost::asio::ip::address_v6(); +#else boost::system::system_error e( boost::asio::error::address_family_not_supported); boost::throw_exception(e); +#endif } return ipv6_address_; } /// Get the address as a string in dotted decimal format. +#ifndef BOOST_NO_EXCEPTIONS std::string to_string() const { if (type_ == ipv6) return ipv6_address_.to_string(); return ipv4_address_.to_string(); } +#endif /// Get the address as a string in dotted decimal format. std::string to_string(boost::system::error_code& ec) const @@ -157,6 +167,7 @@ /// Create an address from an IPv4 address string in dotted decimal form, /// or from an IPv6 address in hexadecimal notation. +#ifndef BOOST_NO_EXCEPTIONS static address from_string(const char* str) { boost::system::error_code ec; @@ -164,6 +175,7 @@ boost::asio::detail::throw_error(ec); return addr; } +#endif /// Create an address from an IPv4 address string in dotted decimal form, /// or from an IPv6 address in hexadecimal notation. @@ -192,12 +204,14 @@ return address(); } +#ifndef BOOST_NO_EXCEPTIONS /// Create an address from an IPv4 address string in dotted decimal form, /// or from an IPv6 address in hexadecimal notation. static address from_string(const std::string& str) { return from_string(str.c_str()); } +#endif /// Create an address from an IPv4 address string in dotted decimal form, /// or from an IPv6 address in hexadecimal notation. @@ -266,7 +280,8 @@ std::basic_ostream& operator<<( std::basic_ostream& os, const address& addr) { - os << addr.to_string(); + if (addr.is_v4()) os << addr.to_v4(); + else os << addr.to_v6(); return os; } diff -ur boost_1_36_0/boost/asio/ip/address_v4.hpp boost_1_36_0_exceptions/boost/asio/ip/address_v4.hpp --- boost_1_36_0/boost/asio/ip/address_v4.hpp 2008-03-12 07:12:08.000000000 -0700 +++ boost_1_36_0_exceptions/boost/asio/ip/address_v4.hpp 2008-11-03 09:04:20.000000000 -0800 @@ -94,6 +94,7 @@ return boost::asio::detail::socket_ops::network_to_host_long(addr_.s_addr); } +#ifndef BOOST_NO_EXCEPTIONS /// Get the address as a string in dotted decimal format. std::string to_string() const { @@ -102,6 +103,7 @@ boost::asio::detail::throw_error(ec); return addr; } +#endif /// Get the address as a string in dotted decimal format. std::string to_string(boost::system::error_code& ec) const @@ -115,6 +117,7 @@ return addr; } +#ifndef BOOST_NO_EXCEPTIONS /// Create an address from an IP address string in dotted decimal form. static address_v4 from_string(const char* str) { @@ -123,6 +126,7 @@ boost::asio::detail::throw_error(ec); return addr; } +#endif /// Create an address from an IP address string in dotted decimal form. static address_v4 from_string(const char* str, boost::system::error_code& ec) @@ -134,11 +138,13 @@ return tmp; } +#ifndef BOOST_NO_EXCEPTIONS /// Create an address from an IP address string in dotted decimal form. static address_v4 from_string(const std::string& str) { return from_string(str.c_str()); } +#endif /// Create an address from an IP address string in dotted decimal form. static address_v4 from_string(const std::string& str, @@ -270,9 +276,11 @@ std::string s = addr.to_string(ec); if (ec) { +#ifndef BOOST_NO_EXCEPTIONS if (os.exceptions() & std::ios::failbit) boost::asio::detail::throw_error(ec); else +#endif os.setstate(std::ios_base::failbit); } else diff -ur boost_1_36_0/boost/asio/ip/address_v6.hpp boost_1_36_0_exceptions/boost/asio/ip/address_v6.hpp --- boost_1_36_0/boost/asio/ip/address_v6.hpp 2008-03-12 07:12:08.000000000 -0700 +++ boost_1_36_0_exceptions/boost/asio/ip/address_v6.hpp 2008-11-03 09:04:40.000000000 -0800 @@ -109,6 +109,7 @@ return bytes; } +#ifndef BOOST_NO_EXCEPTIONS /// Get the address as a string. std::string to_string() const { @@ -117,6 +118,7 @@ boost::asio::detail::throw_error(ec); return addr; } +#endif /// Get the address as a string. std::string to_string(boost::system::error_code& ec) const @@ -130,6 +132,7 @@ return addr; } +#ifndef BOOST_NO_EXCEPTIONS /// Create an address from an IP address string. static address_v6 from_string(const char* str) { @@ -138,6 +141,7 @@ boost::asio::detail::throw_error(ec); return addr; } +#endif /// Create an address from an IP address string. static address_v6 from_string(const char* str, boost::system::error_code& ec) @@ -149,11 +153,13 @@ return tmp; } +#ifndef BOOST_NO_EXCEPTIONS /// Create an address from an IP address string. static address_v6 from_string(const std::string& str) { return from_string(str.c_str()); } +#endif /// Create an address from an IP address string. static address_v6 from_string(const std::string& str, @@ -166,7 +172,11 @@ address_v4 to_v4() const { if (!is_v4_mapped() && !is_v4_compatible()) +#ifdef BOOST_NO_EXCEPTIONS + return address_v4(); +#else throw std::bad_cast(); +#endif address_v4::bytes_type v4_bytes = { { addr_.s6_addr[12], addr_.s6_addr[13], addr_.s6_addr[14], addr_.s6_addr[15] } }; return address_v4(v4_bytes); @@ -388,9 +398,11 @@ std::string s = addr.to_string(ec); if (ec) { +#ifndef BOOST_NO_EXCEPTIONS if (os.exceptions() & std::ios::failbit) boost::asio::detail::throw_error(ec); else +#endif os.setstate(std::ios_base::failbit); } else diff -ur boost_1_36_0/boost/asio/ip/basic_endpoint.hpp boost_1_36_0_exceptions/boost/asio/ip/basic_endpoint.hpp --- boost_1_36_0/boost/asio/ip/basic_endpoint.hpp 2008-03-14 22:31:11.000000000 -0700 +++ boost_1_36_0_exceptions/boost/asio/ip/basic_endpoint.hpp 2008-10-20 22:49:16.000000000 -0700 @@ -318,9 +318,11 @@ std::string a = addr.to_string(ec); if (ec) { +#ifndef BOOST_NO_EXCEPTIONS if (os.exceptions() & std::ios::failbit) boost::asio::detail::throw_error(ec); else +#endif os.setstate(std::ios_base::failbit); } else @@ -344,9 +346,11 @@ std::string a = addr.to_string(ec); if (ec) { +#ifndef BOOST_NO_EXCEPTIONS if (os.exceptions() & std::ios::failbit) boost::asio::detail::throw_error(ec); else +#endif os.setstate(std::ios_base::failbit); } else diff -ur boost_1_36_0/boost/asio/ip/basic_resolver.hpp boost_1_36_0_exceptions/boost/asio/ip/basic_resolver.hpp --- boost_1_36_0/boost/asio/ip/basic_resolver.hpp 2008-03-12 07:12:08.000000000 -0700 +++ boost_1_36_0_exceptions/boost/asio/ip/basic_resolver.hpp 2008-10-20 22:56:56.000000000 -0700 @@ -92,6 +92,7 @@ * A successful call to this function is guaranteed to return at least one * entry. */ +#ifndef BOOST_NO_EXCEPTIONS iterator resolve(const query& q) { boost::system::error_code ec; @@ -99,6 +100,7 @@ boost::asio::detail::throw_error(ec); return i; } +#endif /// Resolve a query to a list of entries. /** @@ -172,6 +174,7 @@ * A successful call to this function is guaranteed to return at least one * entry. */ +#ifndef BOOST_NO_EXCEPTIONS iterator resolve(const endpoint_type& e) { boost::system::error_code ec; @@ -179,6 +182,7 @@ boost::asio::detail::throw_error(ec); return i; } +#endif /// Resolve an endpoint to a list of entries. /** diff -ur boost_1_36_0/boost/asio/ip/detail/socket_option.hpp boost_1_36_0_exceptions/boost/asio/ip/detail/socket_option.hpp --- boost_1_36_0/boost/asio/ip/detail/socket_option.hpp 2008-03-12 07:12:08.000000000 -0700 +++ boost_1_36_0_exceptions/boost/asio/ip/detail/socket_option.hpp 2008-10-20 23:45:50.000000000 -0700 @@ -140,20 +140,28 @@ { if (protocol.family() == PF_INET6) { +#ifndef BOOST_NO_EXCEPTIONS if (s != sizeof(ipv6_value_)) { throw std::length_error( "multicast_enable_loopback socket option resize"); } +#else + BOOST_ASSERT(s == sizeof(ipv6_value_)); +#endif ipv4_value_ = ipv6_value_ ? 1 : 0; } else { +#ifndef BOOST_NO_EXCEPTIONS if (s != sizeof(ipv4_value_)) { throw std::length_error( "multicast_enable_loopback socket option resize"); } +#else + BOOST_ASSERT(s == sizeof(ipv4_value_)); +#endif ipv6_value_ = ipv4_value_ ? 1 : 0; } } @@ -236,8 +244,12 @@ template void resize(const Protocol&, std::size_t s) { +#ifndef BOOST_NO_EXCEPTIONS if (s != sizeof(value_)) throw std::length_error("unicast hops socket option resize"); +#else + BOOST_ASSERT(s == sizeof(value_)); +#endif #if defined(__hpux) if (value_ < 0) value_ = value_ & 0xFF; @@ -270,8 +282,12 @@ // Construct with a specific option value. explicit multicast_hops(int v) { +#ifndef BOOST_NO_EXCEPTIONS if (v < 0 || v > 255) throw std::out_of_range("multicast hops value out of range"); +#else + BOOST_ASSERT(v >= 0 && v <= 255); +#endif ipv4_value_ = (ipv4_value_type)v; ipv6_value_ = v; } @@ -279,8 +295,12 @@ // Set the value of the option. multicast_hops& operator=(int v) { +#ifndef BOOST_NO_EXCEPTIONS if (v < 0 || v > 255) throw std::out_of_range("multicast hops value out of range"); +#else + BOOST_ASSERT(v >= 0 && v <= 255); +#endif ipv4_value_ = (ipv4_value_type)v; ipv6_value_ = v; return *this; @@ -343,8 +363,12 @@ { if (protocol.family() == PF_INET6) { +#ifndef BOOST_NO_EXCEPTIONS if (s != sizeof(ipv6_value_)) throw std::length_error("multicast hops socket option resize"); +#else + BOOST_ASSERT(s == sizeof(ipv6_value_)); +#endif if (ipv6_value_ < 0) ipv4_value_ = 0; else if (ipv6_value_ > 255) @@ -354,8 +378,12 @@ } else { +#ifndef BOOST_NO_EXCEPTIONS if (s != sizeof(ipv4_value_)) throw std::length_error("multicast hops socket option resize"); +#else + BOOST_ASSERT(s == sizeof(ipv4_value_)); +#endif ipv6_value_ = ipv4_value_; } } diff -ur boost_1_36_0/boost/asio/ip/host_name.hpp boost_1_36_0_exceptions/boost/asio/ip/host_name.hpp --- boost_1_36_0/boost/asio/ip/host_name.hpp 2008-03-12 07:12:08.000000000 -0700 +++ boost_1_36_0_exceptions/boost/asio/ip/host_name.hpp 2008-10-21 00:14:21.000000000 -0700 @@ -35,6 +35,7 @@ /// Get the current host name. std::string host_name(boost::system::error_code& ec); +#ifndef BOOST_NO_EXCEPTIONS inline std::string host_name() { char name[1024]; @@ -46,6 +47,7 @@ } return std::string(name); } +#endif inline std::string host_name(boost::system::error_code& ec) { diff -ur boost_1_36_0/boost/asio/ssl/basic_context.hpp boost_1_36_0_exceptions/boost/asio/ssl/basic_context.hpp --- boost_1_36_0/boost/asio/ssl/basic_context.hpp 2008-03-12 07:12:08.000000000 -0700 +++ boost_1_36_0_exceptions/boost/asio/ssl/basic_context.hpp 2008-10-20 23:03:17.000000000 -0700 @@ -80,12 +80,14 @@ * * @throws boost::system::system_error Thrown on failure. */ +#ifndef BOOST_NO_EXCEPTIONS void set_options(options o) { boost::system::error_code ec; service_.set_options(impl_, o, ec); boost::asio::detail::throw_error(ec); } +#endif /// Set options on the context. /** @@ -113,12 +115,14 @@ * * @throws boost::system::system_error Thrown on failure. */ +#ifndef BOOST_NO_EXCEPTIONS void set_verify_mode(verify_mode v) { boost::system::error_code ec; service_.set_verify_mode(impl_, v, ec); boost::asio::detail::throw_error(ec); } +#endif /// Set the peer verification mode. /** @@ -146,12 +150,14 @@ * * @throws boost::system::system_error Thrown on failure. */ +#ifndef BOOST_NO_EXCEPTIONS void load_verify_file(const std::string& filename) { boost::system::error_code ec; service_.load_verify_file(impl_, filename, ec); boost::asio::detail::throw_error(ec); } +#endif /// Load a certification authority file for performing verification. /** @@ -181,12 +187,14 @@ * * @throws boost::system::system_error Thrown on failure. */ +#ifndef BOOST_NO_EXCEPTIONS void add_verify_path(const std::string& path) { boost::system::error_code ec; service_.add_verify_path(impl_, path, ec); boost::asio::detail::throw_error(ec); } +#endif /// Add a directory containing certificate authority files to be used for /// performing verification. @@ -216,12 +224,14 @@ * * @throws boost::system::system_error Thrown on failure. */ +#ifndef BOOST_NO_EXCEPTIONS void use_certificate_file(const std::string& filename, file_format format) { boost::system::error_code ec; service_.use_certificate_file(impl_, filename, format, ec); boost::asio::detail::throw_error(ec); } +#endif /// Use a certificate from a file. /** @@ -249,12 +259,14 @@ * * @throws boost::system::system_error Thrown on failure. */ +#ifndef BOOST_NO_EXCEPTIONS void use_certificate_chain_file(const std::string& filename) { boost::system::error_code ec; service_.use_certificate_chain_file(impl_, filename, ec); boost::asio::detail::throw_error(ec); } +#endif /// Use a certificate chain from a file. /** @@ -282,12 +294,14 @@ * * @throws boost::system::system_error Thrown on failure. */ +#ifndef BOOST_NO_EXCEPTIONS void use_private_key_file(const std::string& filename, file_format format) { boost::system::error_code ec; service_.use_private_key_file(impl_, filename, format, ec); boost::asio::detail::throw_error(ec); } +#endif /// Use a private key from a file. /** @@ -316,12 +330,14 @@ * * @throws boost::system::system_error Thrown on failure. */ +#ifndef BOOST_NO_EXCEPTIONS void use_rsa_private_key_file(const std::string& filename, file_format format) { boost::system::error_code ec; service_.use_rsa_private_key_file(impl_, filename, format, ec); boost::asio::detail::throw_error(ec); } +#endif /// Use an RSA private key from a file. /** @@ -351,12 +367,14 @@ * * @throws boost::system::system_error Thrown on failure. */ +#ifndef BOOST_NO_EXCEPTIONS void use_tmp_dh_file(const std::string& filename) { boost::system::error_code ec; service_.use_tmp_dh_file(impl_, filename, ec); boost::asio::detail::throw_error(ec); } +#endif /// Use the specified file to obtain the temporary Diffie-Hellman parameters. /** @@ -389,6 +407,7 @@ * * @throws boost::system::system_error Thrown on failure. */ +#ifndef BOOST_NO_EXCEPTIONS template void set_password_callback(PasswordCallback callback) { @@ -396,6 +415,7 @@ service_.set_password_callback(impl_, callback, ec); boost::asio::detail::throw_error(ec); } +#endif /// Set the password callback. /** diff -ur boost_1_36_0/boost/asio/ssl/detail/openssl_stream_service.hpp boost_1_36_0_exceptions/boost/asio/ssl/detail/openssl_stream_service.hpp --- boost_1_36_0/boost/asio/ssl/detail/openssl_stream_service.hpp 2008-03-12 07:12:08.000000000 -0700 +++ boost_1_36_0_exceptions/boost/asio/ssl/detail/openssl_stream_service.hpp 2008-10-20 22:37:58.000000000 -0700 @@ -214,8 +214,10 @@ boost::system::error_code handshake(impl_type& impl, Stream& next_layer, stream_base::handshake_type type, boost::system::error_code& ec) { +#ifndef BOOST_NO_EXCEPTIONS try { +#endif openssl_operation op( type == stream_base::client ? &ssl_wrap::SSL_connect: @@ -225,12 +227,14 @@ impl->ssl, impl->ext_bio); op.start(); +#ifndef BOOST_NO_EXCEPTIONS } catch (boost::system::system_error& e) { ec = e.code(); return ec; } +#endif ec = boost::system::error_code(); return ec; @@ -274,8 +278,10 @@ boost::system::error_code shutdown(impl_type& impl, Stream& next_layer, boost::system::error_code& ec) { +#ifndef BOOST_NO_EXCEPTIONS try { +#endif openssl_operation op( &ssl_wrap::SSL_shutdown, next_layer, @@ -283,12 +289,14 @@ impl->ssl, impl->ext_bio); op.start(); +#ifndef BOOST_NO_EXCEPTIONS } catch (boost::system::system_error& e) { ec = e.code(); return ec; } +#endif ec = boost::system::error_code(); return ec; @@ -330,8 +338,10 @@ const Const_Buffers& buffers, boost::system::error_code& ec) { size_t bytes_transferred = 0; +#ifndef BOOST_NO_EXCEPTIONS try { +#endif std::size_t buffer_size = boost::asio::buffer_size(*buffers.begin()); if (buffer_size > max_buffer_size) buffer_size = max_buffer_size; @@ -348,12 +358,14 @@ impl->ext_bio ); bytes_transferred = static_cast(op.start()); +#ifndef BOOST_NO_EXCEPTIONS } catch (boost::system::system_error& e) { ec = e.code(); return 0; } +#endif ec = boost::system::error_code(); return bytes_transferred; @@ -404,8 +416,10 @@ const Mutable_Buffers& buffers, boost::system::error_code& ec) { size_t bytes_transferred = 0; +#ifndef BOOST_NO_EXCEPTIONS try { +#endif std::size_t buffer_size = boost::asio::buffer_size(*buffers.begin()); if (buffer_size > max_buffer_size) buffer_size = max_buffer_size; @@ -422,12 +436,14 @@ ); bytes_transferred = static_cast(op.start()); +#ifndef BOOST_NO_EXCEPTIONS } catch (boost::system::system_error& e) { ec = e.code(); return 0; } +#endif ec = boost::system::error_code(); return bytes_transferred; diff -ur boost_1_36_0/boost/asio/ssl/stream.hpp boost_1_36_0_exceptions/boost/asio/ssl/stream.hpp --- boost_1_36_0/boost/asio/ssl/stream.hpp 2008-03-12 07:12:08.000000000 -0700 +++ boost_1_36_0_exceptions/boost/asio/ssl/stream.hpp 2008-10-20 23:04:40.000000000 -0700 @@ -171,12 +171,14 @@ * * @throws boost::system::system_error Thrown on failure. */ +#ifndef BOOST_NO_EXCEPTIONS void handshake(handshake_type type) { boost::system::error_code ec; service_.handshake(impl_, next_layer_, type, ec); boost::asio::detail::throw_error(ec); } +#endif /// Perform SSL handshaking. /** @@ -222,12 +224,14 @@ * * @throws boost::system::system_error Thrown on failure. */ +#ifndef BOOST_NO_EXCEPTIONS void shutdown() { boost::system::error_code ec; service_.shutdown(impl_, next_layer_, ec); boost::asio::detail::throw_error(ec); } +#endif /// Shut down SSL on the stream. /** @@ -275,6 +279,7 @@ * peer. Consider using the @ref write function if you need to ensure that all * data is written before the blocking operation completes. */ +#ifndef BOOST_NO_EXCEPTIONS template std::size_t write_some(const ConstBufferSequence& buffers) { @@ -283,6 +288,7 @@ boost::asio::detail::throw_error(ec); return s; } +#endif /// Write some data to the stream. /** @@ -352,6 +358,7 @@ * bytes. Consider using the @ref read function if you need to ensure that the * requested amount of data is read before the blocking operation completes. */ +#ifndef BOOST_NO_EXCEPTIONS template std::size_t read_some(const MutableBufferSequence& buffers) { @@ -360,6 +367,7 @@ boost::asio::detail::throw_error(ec); return s; } +#endif /// Read some data from the stream. /** @@ -426,6 +434,7 @@ * * @throws boost::system::system_error Thrown on failure. */ +#ifndef BOOST_NO_EXCEPTIONS template std::size_t peek(const MutableBufferSequence& buffers) { @@ -434,6 +443,7 @@ boost::asio::detail::throw_error(ec); return s; } +#endif /// Peek at the incoming data on the stream. /** @@ -463,6 +473,7 @@ * * @throws boost::system::system_error Thrown on failure. */ +#ifndef BOOST_NO_EXCEPTIONS std::size_t in_avail() { boost::system::error_code ec; @@ -470,6 +481,7 @@ boost::asio::detail::throw_error(ec); return s; } +#endif /// Determine the amount of data that may be read without blocking. /**