Информация об изменениях

Сообщение asio готовится к принятию в стандарт? от 22.04.2015 21:16

Изменено 22.04.2015 21:19 niXman

глянул ньюсы по последней небустовой версии, и обрадовался.
    Implemented changes to substantially reflect the Networking Library Proposal (N4370).
  • New Executor type requirements and classes to support an executor framework, including the execution_context base class, the executor_work class for tracking outstanding work, and the executor polymorphic wrapper. Free functions dispatch(), post() and defer() have been added and are used to submit function objects to executors.
  • Completion handlers now have an associated executor and associated allocator. The free function wrap() is used to associate an executor with a handler or other object. The handler hooks for allocation, invocation and continuation have been deprecated.
  • A system_executor class has been added as a default executor.
  • The io_service class is now derived from execution_context and implements the executor type requirements in its nested executor_type class. The member functions dispatch(), post(), defer() and wrap() have been deprecated. The io_service::work class has been deprecated.
  • The io_service member function reset() has been renamed to restart(). The old name is retained for backward compatibility but has been deprecated.
  • The make_service<>() function is now used to add a new service to an execution context such as an io_service. The add_service() function has been deprecated.
  • A new strand<> template has been added to allow strand functionality to be used with generic executor types.
  • I/O objects (such as sockets and timers) now provide access to their associated io_service via a context() member function. The get_io_service() member function is deprecated.
  • All asynchronous operations and executor operations now support move-only handlers. However, the deprecated io_service::post(), io_service::dispatch(), io_service::strand::post() and io_service::strand::dispatch() functions still require copyable handlers.
  • Waitable timer objects are now movable.
  • Waitable timers, socket iostreams and socket streambufs now provide an expiry() member function for obtaining the expiry time. The accessors expires_at() and expires_after() have been deprecated, though those names are retained for the mutating members.
  • The std::packaged_task class template is now supported as a completion handler. The initiating operation automatically returns the future associated with the task. The package() function has been added as a convenient factory for packaged tasks.
  • Sockets, socket acceptors and descriptors now provide wait() and async_wait() operations that may be used to wait for readiness. The null_buffers type has been deprecated.
  • The proposed error code enum classes are simulated using namespaces. Existing asio error codes now have a correspondence with the standard error conditions.
  • Conversion between IP address types, and conversion from string to address, is now supported via the address_cast<>(), make_address(), make_address_v4() and make_address_v6() free functions. The from_string(), to_v4(), to_v6() and v4_mapped() member functions have been deprecated.
  • A default-constructed ip::address now represents an invalid address value that is neither IPv4 nor IPv6.
  • New buffer() overloads that generate mutable buffers for non-const string objects.
  • Support for dynamic buffer sequences that automatically grow and shrink to accomodate data as it is read or written. This is a generic facility similar to the existing asio::streambuf class. This support includes:
  • New dynamic_string_buffer and dynamic_vector_buffer adapter classes that meet the DynamicBufferSequence type requirements.
  • New dynamic_buffer() factory functions for creating a dynamic buffer adapter for a vector or string.
  • New overloads for the read(), async_read(), write() and async_write(), read_until() and async_read_until() free functions that directly support dynamic buffer sequences.
  • Support for networks and address ranges. Thanks go to Oliver Kowalke for contributing to the design and providing the implementation on which this facility is based. The following new classes have been added:
  • address_iterator_v4 for iterating across IPv4 addresses
  • address_iterator_v6 for iterating across IPv6 addresses
  • address_range_v4 to represent a range of IPv4 addresses
  • address_range_v6 to represent a range of IPv6 addresses
  • network_v4 for manipulating IPv4 CIDR addresses, e.g. 1.2.3.0/24
  • network_v6 for manipulating IPv6 CIDR addresses, e.g. ffe0:/120
  • New convenience headers in <asio/ts/*.hpp> that correspond to the headers in the proposal.

просто оставлю это тут.
глянул ньюсы по последней небустовой версии, и обрадовался.


    Implemented changes to substantially reflect the Networking Library Proposal (N4370).
  • New Executor type requirements and classes to support an executor framework, including the execution_context base class, the executor_work class for tracking outstanding work, and the executor polymorphic wrapper. Free functions dispatch(), post() and defer() have been added and are used to submit function objects to executors.
  • Completion handlers now have an associated executor and associated allocator. The free function wrap() is used to associate an executor with a handler or other object. The handler hooks for allocation, invocation and continuation have been deprecated.
  • A system_executor class has been added as a default executor.
  • The io_service class is now derived from execution_context and implements the executor type requirements in its nested executor_type class. The member functions dispatch(), post(), defer() and wrap() have been deprecated. The io_service::work class has been deprecated.
  • The io_service member function reset() has been renamed to restart(). The old name is retained for backward compatibility but has been deprecated.
  • The make_service<>() function is now used to add a new service to an execution context such as an io_service. The add_service() function has been deprecated.
  • A new strand<> template has been added to allow strand functionality to be used with generic executor types.
  • I/O objects (such as sockets and timers) now provide access to their associated io_service via a context() member function. The get_io_service() member function is deprecated.
  • All asynchronous operations and executor operations now support move-only handlers. However, the deprecated io_service::post(), io_service::dispatch(), io_service::strand::post() and io_service::strand::dispatch() functions still require copyable handlers.
  • Waitable timer objects are now movable.
  • Waitable timers, socket iostreams and socket streambufs now provide an expiry() member function for obtaining the expiry time. The accessors expires_at() and expires_after() have been deprecated, though those names are retained for the mutating members.
  • The std::packaged_task class template is now supported as a completion handler. The initiating operation automatically returns the future associated with the task. The package() function has been added as a convenient factory for packaged tasks.
  • Sockets, socket acceptors and descriptors now provide wait() and async_wait() operations that may be used to wait for readiness. The null_buffers type has been deprecated.
  • The proposed error code enum classes are simulated using namespaces. Existing asio error codes now have a correspondence with the standard error conditions.
  • Conversion between IP address types, and conversion from string to address, is now supported via the address_cast<>(), make_address(), make_address_v4() and make_address_v6() free functions. The from_string(), to_v4(), to_v6() and v4_mapped() member functions have been deprecated.
  • A default-constructed ip::address now represents an invalid address value that is neither IPv4 nor IPv6.
  • New buffer() overloads that generate mutable buffers for non-const string objects.
  • Support for dynamic buffer sequences that automatically grow and shrink to accomodate data as it is read or written. This is a generic facility similar to the existing asio::streambuf class. This support includes:
  • New dynamic_string_buffer and dynamic_vector_buffer adapter classes that meet the DynamicBufferSequence type requirements.
  • New dynamic_buffer() factory functions for creating a dynamic buffer adapter for a vector or string.
  • New overloads for the read(), async_read(), write() and async_write(), read_until() and async_read_until() free functions that directly support dynamic buffer sequences.
  • Support for networks and address ranges. Thanks go to Oliver Kowalke for contributing to the design and providing the implementation on which this facility is based. The following new classes have been added:
  • address_iterator_v4 for iterating across IPv4 addresses
  • address_iterator_v6 for iterating across IPv6 addresses
  • address_range_v4 to represent a range of IPv4 addresses
  • address_range_v6 to represent a range of IPv6 addresses
  • network_v4 for manipulating IPv4 CIDR addresses, e.g. 1.2.3.0/24
  • network_v6 for manipulating IPv6 CIDR addresses, e.g. ffe0:/120
  • New convenience headers in <asio/ts/*.hpp> that correspond to the headers in the proposal.

просто оставлю это тут.