From owner-dev-commits-ports-branches@freebsd.org Tue Apr 13 09:22:11 2021 Return-Path: Delivered-To: dev-commits-ports-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4A1795D972D; Tue, 13 Apr 2021 09:22:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FKKr31hVfz4VYr; Tue, 13 Apr 2021 09:22:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2D139324; Tue, 13 Apr 2021 09:22:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13D9MB79012989; Tue, 13 Apr 2021 09:22:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13D9MBYW012987; Tue, 13 Apr 2021 09:22:11 GMT (envelope-from git) Date: Tue, 13 Apr 2021 09:22:11 GMT Message-Id: <202104130922.13D9MBYW012987@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: Dima Panov Subject: git: 43280b4cc9c9 - 2021Q2 - devel/boost-libs: backport upstream commit to add support to c++20 concepts MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fluffy X-Git-Repository: ports X-Git-Refname: refs/heads/2021Q2 X-Git-Reftype: branch X-Git-Commit: 43280b4cc9c9f99c6697ffe9bbbacd069e1cb912 Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the quarterly branches of the FreeBSD ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Apr 2021 09:22:11 -0000 The branch 2021Q2 has been updated by fluffy: URL: https://cgit.FreeBSD.org/ports/commit/?id=43280b4cc9c9f99c6697ffe9bbbacd069e1cb912 commit 43280b4cc9c9f99c6697ffe9bbbacd069e1cb912 Author: Dima Panov AuthorDate: 2021-04-13 09:13:50 +0000 Commit: Dima Panov CommitDate: 2021-04-13 09:22:02 +0000 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. PR: 255016 Submitted by: amdmi3 MFH: 2021Q2 (cherry picked from commit 4902f812a6107e7789724a91a3fe04f4545b47b1) --- devel/boost-libs/Makefile | 2 +- devel/boost-libs/files/patch-c++20-concepts | 69 +++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+), 1 deletion(-) diff --git a/devel/boost-libs/Makefile b/devel/boost-libs/Makefile index 2d327f1d3604..0ec1a3bdaf1e 100644 --- a/devel/boost-libs/Makefile +++ b/devel/boost-libs/Makefile @@ -1,7 +1,7 @@ # Created by: Alexander Churanov PORTNAME= boost-libs -PORTREVISION= 3 +PORTREVISION= 4 COMMENT= Free portable C++ libraries (without Boost.Python) diff --git a/devel/boost-libs/files/patch-c++20-concepts b/devel/boost-libs/files/patch-c++20-concepts new file mode 100644 index 000000000000..6ac8296abc84 --- /dev/null +++ b/devel/boost-libs/files/patch-c++20-concepts @@ -0,0 +1,69 @@ +From a707db8193b30b6cc4a3d10ee946f7f245e07097 Mon Sep 17 00:00:00 2001 +From: Christopher Kohlhoff +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 ++template + BOOST_ASIO_CONCEPT completion_handler_for = +- detail::is_completion_handler_for::value; ++ detail::is_completion_signature::value ++ && detail::is_completion_handler_for::value; + + #define BOOST_ASIO_COMPLETION_HANDLER_FOR(s) \ + ::boost::asio::completion_handler_for +@@ -488,11 +489,14 @@ struct initiation_archetype + + } // namespace detail + +-template +-BOOST_ASIO_CONCEPT completion_token_for = requires(T&& t) +-{ +- async_initiate(detail::initiation_archetype{}, t); +-}; ++template ++BOOST_ASIO_CONCEPT completion_token_for = ++ detail::is_completion_signature::value ++ && ++ requires(T&& t) ++ { ++ async_initiate(detail::initiation_archetype{}, t); ++ }; + + #define BOOST_ASIO_COMPLETION_TOKEN_FOR(s) \ + ::boost::asio::completion_token_for +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) +