-
Notifications
You must be signed in to change notification settings - Fork 416
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
Concepts build error async_result.hpp #312
Comments
We also encountered the same problem. Reproduce steps:
ErrorMessage: |
Two things are causing this issue. The first is that The second problem is this code from async_result.hpp
The first snippet is defining a concept. The second is trying to constrain the concept definition on the first concept, which is incorrect. Assuming the logic is otherwise correct, what you need to do here is instead (for the second snippet)
Alternatively, |
Disable MSVC concepts for the time being: if (MSVC)
add_definitions(-DBOOST_ASIO_DISABLE_CONCEPTS)
endif() |
This does not just affect MSVC. clang trunk fails to compile the code due to the second issue I outlined, and I wouldn't be surprised if gcc trunk will fail, too. |
GCC-10 also fails to build.
the reason why it compiles with GCC-9 and before is that |
Hmm, it seems like it is a complete semantic change, so not a regression, but more serious than that. |
I can confirm this fails to compile with clang-11 There is a warning for the old way of specifying a concept
and there is an error for constraining the concept
I edited the source following #312 (comment) and it worked (there is another instance of the same problem, but removing the concept from the template type and moving it |
Related Downstream: boostorg/beast#1884 |
I have just faced this issue when I specified |
asio hasn't tracked the latest changes in the C++ standard, see e.g. boostorg/asio#312. We can revert this when asio has been fixed and updated in our repo. Change-Id: Ie6df077e851992db7d1fe5448893556d48cce594
Bug reference: boostorg/asio#312
This issue was moved by chriskohlhoff to chriskohlhoff/asio#738. |
In Visual Studio 16.3
I set the following project property:
C++ Language Standard: Preview - Features from the Latest C++ Working Draft (/std:c++latest)
Compilation fails for async_result.hpp
The text was updated successfully, but these errors were encountered: