FreeBSD Bugzilla – Attachment 224066 Details for
Bug 255016
devel/boost-libs: fix c++20 concept support
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
boost-libs.patch (text/plain), 3.64 KB, created by
Dmitry Marakasov
on 2021-04-12 19:41:52 UTC
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Dmitry Marakasov
Created:
2021-04-12 19:41:52 UTC
Size:
3.64 KB
patch
obsolete
>commit d5801fea87d2bde5d3f725106dc43185ac6ff0b5 >Author: Dmitry Marakasov <amdmi3@FreeBSD.org> >Date: Mon Apr 12 21:14:50 2021 +0300 > > devel/boost-libs: backport upstream commit to add support to c++20 concepts > > Until newer boost is ported, this fixes compilation of client code with errors like > > async_result.hpp: error: concept cannot have associated constraints > > See https://github.com/boostorg/asio/issues/312 for details. > >diff --git devel/boost-libs/Makefile devel/boost-libs/Makefile >index 0ec1a3bdaf1e..4e1602f70822 100644 >--- devel/boost-libs/Makefile >+++ devel/boost-libs/Makefile >@@ -1,7 +1,7 @@ > # Created by: Alexander Churanov <churanov.port.maintainer@gmail.com> > > PORTNAME= boost-libs >-PORTREVISION= 4 >+PORTREVISION= 5 > > COMMENT= Free portable C++ libraries (without Boost.Python) > >diff --git devel/boost-libs/files/patch-c++20-concepts devel/boost-libs/files/patch-c++20-concepts >new file mode 100644 >index 000000000000..6ac8296abc84 >--- /dev/null >+++ devel/boost-libs/files/patch-c++20-concepts >@@ -0,0 +1,69 @@ >+From a707db8193b30b6cc4a3d10ee946f7f245e07097 Mon Sep 17 00:00:00 2001 >+From: Christopher Kohlhoff <chris@kohlhoff.com> >+Date: Tue, 7 Apr 2020 11:18:31 +1000 >+Subject: [PATCH] Support C++20 concept syntax. >+ >+--- >+ include/boost/asio/async_result.hpp | 18 +++++++++++------- >+ include/boost/asio/detail/config.hpp | 10 +++++++--- >+ 2 files changed, 18 insertions(+), 10 deletions(-) >+ >+diff --git a/include/boost/asio/async_result.hpp b/include/boost/asio/async_result.hpp >+index 2f4b337d1..0eea0f471 100644 >+--- boost/asio/async_result.hpp >++++ boost/asio/async_result.hpp >+@@ -66,9 +66,10 @@ BOOST_ASIO_CONCEPT completion_signature = >+ #define BOOST_ASIO_COMPLETION_SIGNATURE \ >+ ::boost::asio::completion_signature >+ >+-template <typename T, completion_signature Signature> >++template <typename T, typename Signature> >+ BOOST_ASIO_CONCEPT completion_handler_for = >+- detail::is_completion_handler_for<T, Signature>::value; >++ detail::is_completion_signature<Signature>::value >++ && detail::is_completion_handler_for<T, Signature>::value; >+ >+ #define BOOST_ASIO_COMPLETION_HANDLER_FOR(s) \ >+ ::boost::asio::completion_handler_for<s> >+@@ -488,11 +489,14 @@ struct initiation_archetype >+ >+ } // namespace detail >+ >+-template <typename T, completion_signature Signature> >+-BOOST_ASIO_CONCEPT completion_token_for = requires(T&& t) >+-{ >+- async_initiate<T, Signature>(detail::initiation_archetype<Signature>{}, t); >+-}; >++template <typename T, typename Signature> >++BOOST_ASIO_CONCEPT completion_token_for = >++ detail::is_completion_signature<Signature>::value >++ && >++ requires(T&& t) >++ { >++ async_initiate<T, Signature>(detail::initiation_archetype<Signature>{}, t); >++ }; >+ >+ #define BOOST_ASIO_COMPLETION_TOKEN_FOR(s) \ >+ ::boost::asio::completion_token_for<s> >+diff --git a/include/boost/asio/detail/config.hpp b/include/boost/asio/detail/config.hpp >+index 27d1d6753..6b85cccea 100644 >+--- boost/asio/detail/config.hpp >++++ boost/asio/detail/config.hpp >+@@ -343,10 +343,14 @@ >+ // Support concepts on compilers known to allow them. >+ #if !defined(BOOST_ASIO_HAS_CONCEPTS) >+ # if !defined(BOOST_ASIO_DISABLE_CONCEPTS) >+-# if __cpp_concepts >++# if defined(__cpp_concepts) >+ # define BOOST_ASIO_HAS_CONCEPTS 1 >+-# define BOOST_ASIO_CONCEPT concept bool >+-# endif // __cpp_concepts >++# if (__cpp_concepts >= 201707) >++# define BOOST_ASIO_CONCEPT concept >++# else // (__cpp_concepts >= 201707) >++# define BOOST_ASIO_CONCEPT concept bool >++# endif // (__cpp_concepts >= 201707) >++# endif // defined(__cpp_concepts) >+ # endif // !defined(BOOST_ASIO_DISABLE_CONCEPTS) >+ #endif // !defined(BOOST_ASIO_HAS_CONCEPTS) >+
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 255016
: 224066