asio, beast and concepts

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

asio, beast and concepts

Boost - Users mailing list
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 mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: asio, beast and concepts

Boost - Users mailing list


On Mon, 23 Mar 2020 at 17:09, David P. Riedel via Boost-users <[hidden email]> wrote:
Hi
 ...
 
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.


Are these the only criteria to reproduce the problem, or is there something else I should know about the setup prior to investigating?
 
I have no problems using these compiler flags with other non-boost code.


Thanks


_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users


--
Richard Hodges
office: +442032898513
home: +376841522
mobile: +376380212


_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: asio, beast and concepts

Boost - Users mailing list


That should do it.


I changed my user-config.jam as described, changed to the test directory in libs/beast and ran b2 -a


Dave

On 3/23/20 12:57 PM, Richard Hodges wrote:


On Mon, 23 Mar 2020 at 17:09, David P. Riedel via Boost-users <[hidden email]> wrote:
Hi
 ...
 
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.


Are these the only criteria to reproduce the problem, or is there something else I should know about the setup prior to investigating?
 
I have no problems using these compiler flags with other non-boost code.


Thanks


_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users


--
Richard Hodges
office: +442032898513
home: +376841522
mobile: +376380212


_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: asio, beast and concepts

Boost - Users mailing list
In reply to this post by Boost - Users mailing list
On Mon, Mar 23, 2020 at 9:10 AM David P. Riedel via Boost-users
<[hidden email]> wrote:
> My set up:

Perhaps you might provide a self-contained example program which
exhibits the problem here:

<https://godbolt.org/z/uPrSGo>

Thanks
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Fwd: Re: asio, beast and concepts

Boost - Users mailing list
In reply to this post by Boost - Users mailing list

That should do it.


I changed my user-config.jam as described, changed to the test directory in libs/beast and ran b2 -a


Dave

On 3/23/20 12:57 PM, Richard Hodges wrote:


On Mon, 23 Mar 2020 at 17:09, David P. Riedel via Boost-users <[hidden email]> wrote:
Hi
 ...
 
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.


Are these the only criteria to reproduce the problem, or is there something else I should know about the setup prior to investigating?
 
I have no problems using these compiler flags with other non-boost code.


Thanks


_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users


--
Richard Hodges
office: +442032898513
home: +376841522
mobile: +376380212


_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: asio, beast and concepts

Boost - Users mailing list
In reply to this post by Boost - Users mailing list
On 3/23/20 1:24 PM, Vinnie Falco via Boost-users wrote:

> On Mon, Mar 23, 2020 at 9:10 AM David P. Riedel via Boost-users
> <[hidden email]> wrote:
>> My set up:
>
> Perhaps you might provide a self-contained example program which
> exhibits the problem here:
>
> <https://godbolt.org/z/uPrSGo>
>
> Thanks
>

I'm just building the tests from the boost distribution.  No code of
mine involved.

libs/beast/tests


_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: asio, beast and concepts

Boost - Users mailing list
In reply to this post by Boost - Users mailing list
On Mon, 23 Mar 2020 at 17:24, Vinnie Falco via Boost-users
<[hidden email]> wrote:
>
> On Mon, Mar 23, 2020 at 9:10 AM David P. Riedel via Boost-users
> <[hidden email]> wrote:
> > My set up:
>
> Perhaps you might provide a self-contained example program which
> exhibits the problem here:
>
> <https://godbolt.org/z/uPrSGo>

This empty main with a recent gcc and -fconcepts is enough to trigger
plenty of errors.
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: asio, beast and concepts

Boost - Users mailing list


Thanks !

On 3/23/20 2:25 PM, Mathias Gaunard wrote:
On Mon, 23 Mar 2020 at 17:24, Vinnie Falco via Boost-users
[hidden email] wrote:
On Mon, Mar 23, 2020 at 9:10 AM David P. Riedel via Boost-users
[hidden email] wrote:
My set up:
Perhaps you might provide a self-contained example program which
exhibits the problem here:

<https://godbolt.org/z/uPrSGo>
This empty main with a recent gcc and -fconcepts is enough to trigger
plenty of errors.

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users