Currently, the test stream code doesn't compile when both debug builds
(namely assertions) are enabled along with disabling rtti. The current
code directly uses type_id(), which isn't available without rtti.
This commit allows stream.hpp to compile without rtti enabled.
Signed-off-by: Ed Tanous <ed@tanous.net>
close#2331
* avoid one instantiation of `bind_handler_front`
* avoid going through the 2-arg post unnecessarily in `read_op`
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
* `basic_parser` now uses pure virtual member functions instead
of the curiously recurring template pattern.
Actions Required:
* Change uses of the `basic_parser` type to omit the `Derived`
template parameter
* Classes derived from `basic_parser` no longer need to friend
the base.
* Virtual functions in the derived class may be marked `override`.
- Call the completion handler with the correct signature
- Replicate ASIO socket behavior of async operation completions
- Fix a data race between read_op and a call to stream::nread()
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
* is_completion_handler is deprecated
* type_traits.hpp is a deprecated include
These items will be removed in the next version
* Include the new header file for the types needed:
- stream_traits.hpp
- file_base.hpp
* Use std::is_invocable instead of is_completion_handler
This algorithm allows a socket-like object to be closed in
a generic context. The customization point enables user-defined
types to define the close algorithm to use with `close_socket`.
The nested function lowest_layer and nested type lowest_layer_type
are removed from all stream layers.
Actions Required:
* Remove lowest_layer and lowest_layer_type from user-defined streams.
* Use the get_lowest_layer free function and the lowest_layer_type trait
as needed.