diff mbox

Fix concept checks usage

Message ID c4e450c2-130b-b691-c626-df6c62fe5235@gmail.com
State New
Headers show

Commit Message

François Dumont Dec. 15, 2016, 8:45 p.m. UTC
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

Comments

Jonathan Wakely Dec. 16, 2016, 11:20 a.m. UTC | #1
On 15/12/16 21:45 +0100, François Dumont wrote:
>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 ?


OK, thanks.
diff mbox

Patch

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<result_type>::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<result_type>::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);