Commit afcd05a7 by Paolo Carlini Committed by Paolo Carlini

random.tcc: Minor formatting changes.

2010-03-19  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/random.tcc: Minor formatting changes.

2010-03-19  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/stl_algo.h (shuffle): Fix typo in signature.
	* include/bits/algorithmfwd.h: Adjust.
	* testsuite/25_algorithms/shuffle/requirements/
	explicit_instantiation/2.cc: Likewise.
	* testsuite/25_algorithms/shuffle/requirements/
	explicit_instantiation/pod.cc: Likewise.

From-SVN: r157565
parent 247d8075
2010-03-19 Paolo Carlini <paolo.carlini@oracle.com> 2010-03-19 Paolo Carlini <paolo.carlini@oracle.com>
* include/bits/random.tcc: Minor formatting changes.
2010-03-19 Paolo Carlini <paolo.carlini@oracle.com>
* include/bits/stl_algo.h (shuffle): Fix typo in signature.
* include/bits/algorithmfwd.h: Adjust.
* testsuite/25_algorithms/shuffle/requirements/
explicit_instantiation/2.cc: Likewise.
* testsuite/25_algorithms/shuffle/requirements/
explicit_instantiation/pod.cc: Likewise.
2010-03-19 Paolo Carlini <paolo.carlini@oracle.com>
* include/bits/stl_algo.h (shuffle): Add, per D3056. * include/bits/stl_algo.h (shuffle): Add, per D3056.
(random_shuffle): Fix signature in C++0x mode. (random_shuffle): Fix signature in C++0x mode.
(lower_bound, __lg): Move... (lower_bound, __lg): Move...
......
...@@ -521,7 +521,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ...@@ -521,7 +521,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
#if defined(__GXX_EXPERIMENTAL_CXX0X__) && defined(_GLIBCXX_USE_C99_STDINT_TR1) #if defined(__GXX_EXPERIMENTAL_CXX0X__) && defined(_GLIBCXX_USE_C99_STDINT_TR1)
template<typename _RAIter, typename _UGenerator> template<typename _RAIter, typename _UGenerator>
void void
shuffle(_RAIter, _RAIter, _UGenerator&&); shuffle(_RAIter, _RAIter, _UGenerator&);
#endif #endif
template<typename _RAIter> template<typename _RAIter>
......
...@@ -87,16 +87,16 @@ namespace std ...@@ -87,16 +87,16 @@ namespace std
{ return __a * __x + __c; } { return __a * __x + __c; }
}; };
template<typename _InputIterator, typename _OutputIterator, template<typename _InputIterator, typename _OutputIterator,
typename _UnaryOperation> typename _UnaryOperation>
_OutputIterator _OutputIterator
__transform(_InputIterator __first, _InputIterator __last, __transform(_InputIterator __first, _InputIterator __last,
_OutputIterator __result, _UnaryOperation __unary_op) _OutputIterator __result, _UnaryOperation __unary_op)
{ {
for (; __first != __last; ++__first, ++__result) for (; __first != __last; ++__first, ++__result)
*__result = __unary_op(*__first); *__result = __unary_op(*__first);
return __result; return __result;
} }
} // namespace __detail } // namespace __detail
......
...@@ -4079,7 +4079,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ...@@ -4079,7 +4079,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
typename _UniformRandomNumberGenerator> typename _UniformRandomNumberGenerator>
void void
shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last, shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last,
_UniformRandomNumberGenerator&& __g) _UniformRandomNumberGenerator& __g)
{ {
// concept requirements // concept requirements
__glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept< __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
......
...@@ -34,5 +34,5 @@ namespace std ...@@ -34,5 +34,5 @@ namespace std
typedef value_type* iterator_type; typedef value_type* iterator_type;
typedef std::mt19937_64 ugenerator_type; typedef std::mt19937_64 ugenerator_type;
template void shuffle(iterator_type, iterator_type, ugenerator_type&&); template void shuffle(iterator_type, iterator_type, ugenerator_type&);
} }
...@@ -33,5 +33,5 @@ namespace std ...@@ -33,5 +33,5 @@ namespace std
typedef value_type* iterator_type; typedef value_type* iterator_type;
typedef std::mt19937_64 ugenerator_type; typedef std::mt19937_64 ugenerator_type;
template void shuffle(iterator_type, iterator_type, ugenerator_type&&); template void shuffle(iterator_type, iterator_type, ugenerator_type&);
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment