-
Notifications
You must be signed in to change notification settings - Fork 1.3k
add conan package setup for standalone version of asio #296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The coanan package is created with cmake and tested with ctest
|
I did not change any code nor a config script, the CI build failure must be not my fault! |
Clang-cl identifies both as clang and as MSVC. This resulted in defining ASIO_HAS_STD_STRING_VIEW twice.
…ying. This is reported as a warning by recent Clang.
…cted resolver results.
…with newer clang/libc++.
This change adds a new set of type requirements for dynamic buffers,
DynamicBuffer_v2, which supports copy construction. These new type
requirements enable dynamic buffers to be used as arguments to
user-defined composed operations, where the same dynamic buffer object
is used repeatedly for multiple underlying operations. For example:
template <typename DynamicBuffer>
void echo_line(tcp::socket& sock, DynamicBuffer buf)
{
n = asio::read_until(sock, buf, '\n');
asio::write(sock, buf, asio::transfer_exactly(n));
}
The original DynamicBuffer type requirements have been renamed to
DynamicBuffer_v1.
New type traits is_dynamic_buffer_v1 and is_dynamic_buffer_v2 have been
added to test for conformance to DynamicBuffer_v1 and DynamicBuffer_v2
respectively. The existing is_dynamic_buffer trait has been retained and
delegates to is_dynamic_buffer_v1, unless ASIO_NO_DYNAMIC_BUFFER_V1 is
defined, in which case it delegates to is_dynamic_buffer_v2.
The dynamic_string_buffer and dynamic_vector buffer classes conform to
both DynamicBuffer_v1 and DynamicBuffer_v2 requirements.
When ASIO_NO_DYNAMIC_BUFFER_V1 is defined, all support for
DynamicBuffer_v1 types and functions is #ifdef-ed out. Support for using
basic_streambuf with the read, async_read, read_until, async_read_until,
write, and async_write functions is also disabled as a consequence.
This change should have no impact on existing source code that simply
uses dynamic buffers in conjunction with asio's composed operations,
such as:
string data;
// ...
size_t n = asio::read_until(my_socket
asio::dynamic_buffer(data, MY_MAX),
'\n');
…elper function async_compose.
Users should define ASIO_ENABLE_BOOST to explicitly disable standalone mode when compiling with C++11 or later.
Although MSVC 11.0 supports the decltype keyword, it does not operate correctly when used in the buffer sequence detection traits. This change fixes compile errors when trying to use the read and write composed operations with MSVC 11.0.
The moved-from I/O object needs to be left in the same state as if constructed with a valid executor but without a resource.
The coanan package is created with cmake and tested with ctest
100% tests passed, 0 tests failed out of 124 Total Test time (real) = 60.04 sec
|
I added a .clang-tidy file too. It can be used with cmake while compiling or as post compile check. see too: |
The coanan package is created with cmake and tested with ctest