chriskohlhoff / asio

Asio C++ Library
http://think-async.com/Asio
4.94k stars 1.22k forks source link

Compile error boost 1.81 beta #1154

Open madmongo1 opened 1 year ago

madmongo1 commented 1 year ago

To reproduce:

main.cpp

#include <boost/asio.hpp>
#include <boost/asio/experimental/co_composed.hpp>

compile with:

/usr/bin/c++ -std=gnu++23 -c main.cpp

Error output:

[build] In file included from .../include/boost/asio/experimental/co_composed.hpp:144,
[build]                  from main.cpp:2:
[build] .../include/boost/asio/experimental/impl/co_composed.hpp:1092:8: error: ‘coroutine_traits’ is not a class template
[build]  1092 | struct coroutine_traits<void, C&,
[build]       |        ^~~~~~~~~~~~~~~~
klemens-morgenstern commented 1 year ago

I think this is caused by the standalone to boost conversion script. It's correct in the standalone version

https://github.com/chriskohlhoff/asio/blob/master/asio/include/asio/experimental/impl/co_composed.hpp#L1081

but std becomes boost::system in the boost one.

https://github.com/boostorg/asio/blob/dac750114ce6ece3091e140fbd9bb417df159d1d/include/boost/asio/experimental/impl/co_composed.hpp#L1083-L1088.

So I would think that a std::error_code -> boost::system::error_code conversion rules screws this one up.

madmongo1 commented 1 year ago

@chriskohlhoff - this is a blocker for boost 1.81