[boost] ASIO problem with boost 1.78.0.beta1 ?

已查看 140 次
跳至第一个未读帖子

Stefan Heinzmann via Boost

未读,
2021年11月13日 09:34:512021/11/13
收件人 Hans Dembinski via Boost、Stefan Heinzmann
Hi all,

I'm observing a problem with boost::asio that has surfaced with the
newest beta relative to version 1.77.0, using MSVC 16.11.6.

I'm getting the following errors:

1>...src\libs\asio\include\boost/asio/impl/any_io_executor.ipp(26,18):
error C2039: 'any_io_executor': is not a member of 'boost::asio::executor'
1>...src\libs\asio\include\boost/asio/executor.hpp(48): message : see
declaration of 'boost::asio::executor'
1>...src\libs\asio\include\boost/asio/impl/any_io_executor.ipp(26,34):
error C2059: syntax error: ')'
1>...src\libs\asio\include\boost/asio/impl/any_io_executor.ipp(28,1):
error C4430: missing type specifier - int assumed. Note: C++ does not
support default-int

...and so on.

The errors seem rather weird to me, so I might be doing something wrong
myself, but the exact same code compiles fine with 1.77.0, using the
same compiler.

Has anyone got an idea what's wrong? Should I raise an issue in github?

Cheers
Stefan Heinzmann

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Stefan Heinzmann via Boost

未读,
2021年11月13日 10:47:522021/11/13
收件人 bo...@lists.boost.org、Stefan Heinzmann
Hi all,

I have taken the opportunity to migrate my code to use any_io_executor
instead of executor, as recommended here:

https://stackoverflow.com/questions/65840258/boost-1-74-0-asio-executor-migration-issues

I now don't need to define BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT
anymore. That fixes the problem. I verified this by compiling with
gcc-11, too, where the original problem was also present.

Hence it seems to me that backwards compatibility of boost::asio through
BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT is broken in 1.78.0.beta1.

Cheers
Stefan Heinzmann
回复全部
回复作者
转发
0 个新帖子