From patchwork Thu Dec 15 20:45:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Fran=C3=A7ois_Dumont?= X-Patchwork-Id: 88228 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp1021806qgi; Thu, 15 Dec 2016 12:46:00 -0800 (PST) X-Received: by 10.99.204.81 with SMTP id q17mr5342016pgi.168.1481834760857; Thu, 15 Dec 2016 12:46:00 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id a91si4066686pli.208.2016.12.15.12.46.00 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Dec 2016 12:46:00 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-444556-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-444556-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-444556-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE dis=NONE) header.from=gmail.com DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :subject:to:message-id:date:mime-version:content-type; q=dns; s= default; b=NSVowlnz38qBhaUQBnbAMIfLrCopTSjNWc9UMmHXYBcyoUsFLSu1w s+cAaGPbGRWVk4T7Twd6bREy1ALP24kqUb0ERVGkZb39Up2NJW3veJT2XlZG/jTh 5fCRuJSxsRoVeAqNKn9+9xlLR6pCEH0xgRjUmKPvrq3PgSBj8jehEk= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :subject:to:message-id:date:mime-version:content-type; s= default; bh=1rWPiCg9cFV5p27rJOz+dbHO2JI=; b=jYaK2I/UxFqDMFQYWLho 8tsuGQcBcD8KsbxilICvcNOKIDjN4bI/dVHUOH13HZEoVC2xyDyIYmoUpc5J3mSB fR0aD7ieemFpylr4tFH4Zc1sVkqSaacdmhN3iEolMHIq/q/k57SuBjlXOUA846J2 yGq91VnIb1AJGrvOk4o/RYY= Received: (qmail 90896 invoked by alias); 15 Dec 2016 20:45:45 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 88420 invoked by uid 89); 15 Dec 2016 20:45:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=UD:tcc, 16558, maintained X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-wm0-f44.google.com Received: from mail-wm0-f44.google.com (HELO mail-wm0-f44.google.com) (74.125.82.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 15 Dec 2016 20:45:41 +0000 Received: by mail-wm0-f44.google.com with SMTP id g23so3210179wme.1; Thu, 15 Dec 2016 12:45:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:message-id:date:user-agent :mime-version; bh=m9IvaR8SE0gjwvFd71hC+o/ZR6NWt1CLGkJMNLR8C0s=; b=SDfBx/D3TLf4tJMglEE96AbcO1+07dZVgSWKP03xNmuWealBEOkQV7RGdOVojuF1Sf rSoVpCgKUlpcM/ATrTuwh/Osifv6L3UGlc74/H+7I1Im98XNvojlaHeJ3WyycQia7Rfc cfiL/1AssfhH5z9oSVZmi6h6cEqdUVTXMdtGL4SKKsvIX1gEtjPmL2KtRXHE7m2iRYlt bIvmnhY3met4QzbAF+Qfce7SiAA4i9EosiLEBWEPKqugCl85MjOHUSA3mPITrqBUB6+F BCh5nCPdG4jOj7UzCulbBjK7jIaUw2fmxy8GxCkoAcTjFttCvHKKBHOlzgHbZUUsjkmn 5Dtw== X-Gm-Message-State: AIkVDXLGEjqab1ZVfQUZa9FmmC+P9ufojQjzrxaGGcntmFrieXWRAytfU3hc19RTHj3niA== X-Received: by 10.28.10.147 with SMTP id 141mr166967wmk.65.1481834739378; Thu, 15 Dec 2016 12:45:39 -0800 (PST) Received: from [192.168.0.23] (arf62-1-82-237-250-248.fbx.proxad.net. [82.237.250.248]) by smtp.googlemail.com with ESMTPSA id e188sm164030wma.21.2016.12.15.12.45.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Dec 2016 12:45:38 -0800 (PST) From: =?UTF-8?Q?Fran=c3=a7ois_Dumont?= Subject: Fix concept checks usage To: "libstdc++@gcc.gnu.org" , gcc-patches Message-ID: Date: Thu, 15 Dec 2016 21:45:35 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 Hi Here is a fix in the usage of a concept check. There are also many testsuite failures when using concept checks but this one forbids the library from being built. I know that concept checks are not really maintained so maybe the fix is to simply remove those checks. * include/ext/random.tcc: Fix usage of _OutputIteratorConcept. Tested under Linux x86 with and without concept checks. Ok to commit ? François diff --git a/libstdc++-v3/include/ext/random.tcc b/libstdc++-v3/include/ext/random.tcc index e1fd88d..9b3a86eb 100644 --- a/libstdc++-v3/include/ext/random.tcc +++ b/libstdc++-v3/include/ext/random.tcc @@ -440,7 +440,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _UniformRandomNumberGenerator& __urng, const param_type& __param) { - __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator>) + __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator, + result_type>) std::__detail::_Adaptor<_UniformRandomNumberGenerator, result_type> __aurng(__urng); @@ -725,7 +726,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _UniformRandomNumberGenerator& __urng, const param_type& __p) { - __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator>) + __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator, + result_type>) while (__f != __t) { @@ -799,7 +801,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _UniformRandomNumberGenerator& __urng, const param_type& __p) { - __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator>) + __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator, + result_type>) typename std::gamma_distribution::param_type __pg(__p.mu(), __p.omega() / __p.mu()); @@ -863,7 +866,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _UniformRandomNumberGenerator& __urng, const param_type& __p) { - __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator>) + __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator, + result_type>) result_type __mu_val = __p.mu(); result_type __malphinv = -result_type(1) / __p.alpha(); @@ -953,7 +957,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _UniformRandomNumberGenerator& __urng, const param_type& __p) { - __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator>) + __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator, + result_type>) typename std::gamma_distribution::param_type __p1(__p.lambda(), result_type(1) / __p.lambda()), @@ -1024,7 +1029,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _UniformRandomNumberGenerator& __urng, const param_type& __p) { - __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator>) + __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator, + result_type>) result_type __dif = __p.b() - __p.a(); result_type __sum = __p.a() + __p.b(); @@ -1121,7 +1127,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _UniformRandomNumberGenerator& __urng, const param_type& __p) { - __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator>) + __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator, + result_type>) result_type __2q = result_type(2) * __p.q(); result_type __q2 = __p.q() * __p.q(); @@ -1196,7 +1203,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _UniformRandomNumberGenerator& __urng, const param_type& __param) { - __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator>) + __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator, + result_type>) while (__f != __t) *__f++ = this->operator()(__urng, __param); @@ -1297,7 +1305,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _UniformRandomNumberGenerator& __urng, const param_type& __param) { - __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator>) + __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator, + result_type>) while (__f != __t) *__f++ = this->operator()(__urng, __param); @@ -1403,7 +1412,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _UniformRandomNumberGenerator& __urng, const param_type& __param) { - __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator>) + __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator, + result_type>) while (__f != __t) *__f++ = this->operator()(__urng); @@ -1481,7 +1491,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _UniformRandomNumberGenerator& __urng, const param_type& __p) { - __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator>) + __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator, + result_type>) + std::__detail::_Adaptor<_UniformRandomNumberGenerator, result_type> __aurng(__urng); @@ -1643,7 +1655,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _UniformRandomNumberGenerator& __urng, const param_type& __param) { - __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator>) + __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator, + result_type>) while (__f != __t) *__f++ = this->operator()(__urng, __param); @@ -1773,7 +1786,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _UniformRandomNumberGenerator& __urng, const param_type& __param) { - __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator>) + __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator, + result_type>) while (__f != __t) *__f++ = this->operator()(__urng, __param);