|
Boost Users : |
From: David P. Riedel (driedel_at_[hidden])
Date: 2020-03-23 16:09:38
Hi
I have been experimenting with some C++20 concepts code. Currently, I
have a program which uses beast and asio to do some network file
transfers. I was thinking of adding a small piece of code to my code
which includes a concept.
Prior to doing this, I tried building the beast tests from the 1.72
version with concepts enabled in the compiler. I got lots of errors
such as the one below.
beast/http/write.cpp:313:44: error: use of âauto
boost::beast::http::async_write(AsyncWriteStream&, const
boost::beast::http::message<isRequest, Body, Fields>&, WriteHandler&&,
typename std::enable_if<(!
boost::beast::http::is_mutable_body_writer<Body>::value)>::type*) [with
AsyncWriteStream = boost::beast::test::stream; bool isRequest = false;
Body = boost::beast::http::basic_string_body<char>; Fields =
boost::beast::http::basic_fields<std::allocator<char> >; WriteHandler =
boost::asio::basic_yield_context<boost::asio::executor_binder<void
(*)(), boost::asio::executor> >; typename std::enable_if<(!
boost::beast::http::is_mutable_body_writer<Body>::value)>::type = void]â
before deduction of âautoâ
313 | async_write(ts, m, do_yield[ec]);
| ^
Are beast and asio not concepts ready? Or am I missing something? Is
there some flag I need to set?
My set up:
boost: 1.72
gcc: 9.3
I added -std=c++2a -fconcepts to compile flags in my user-config.jam
file to enable compiler concepts support.
I have no problems using these compiler flags with other non-boost code.
Thanks
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net