From 284a35df5d759e4ed0c7e03b5354dbfafddd67df Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fran=C3=A7ois=20Dumont?= Date: Sat, 24 Dec 2016 14:13:58 +0000 Subject: [PATCH] random.tcc: Fix usage of _OutputIteratorConcept. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 2016-12-24 François Dumont * include/ext/random.tcc: Fix usage of _OutputIteratorConcept. From-SVN: r243915 --- libstdc++-v3/ChangeLog | 4 +++ libstdc++-v3/include/ext/random.tcc | 40 +++++++++++++++++++---------- 2 files changed, 31 insertions(+), 13 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 793be154ac0..32b81e8bbb7 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,7 @@ +2016-12-24 François Dumont + + * include/ext/random.tcc: Fix usage of _OutputIteratorConcept. + 2016-12-21 Jason Merrill * testsuite/util/testsuite_tr1.h (test_property): Don't define both diff --git a/libstdc++-v3/include/ext/random.tcc b/libstdc++-v3/include/ext/random.tcc index e1fd88d6408..9b3a86eb20d 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); -- 2.30.2