stl_algobase.h (fill, fill_n): Tighten the dispatch: use iterator_traits<>::value_type, not _Tp.
2004-06-25 Paolo Carlini <pcarlini@suse.de> * include/bits/stl_algobase.h (fill, fill_n): Tighten the dispatch: use iterator_traits<>::value_type, not _Tp. From-SVN: r83648
This commit is contained in:
parent
68d560d4d6
commit
1a277d94fe
@ -1,3 +1,8 @@
|
|||||||
|
2004-06-25 Paolo Carlini <pcarlini@suse.de>
|
||||||
|
|
||||||
|
* include/bits/stl_algobase.h (fill, fill_n): Tighten the
|
||||||
|
dispatch: use iterator_traits<>::value_type, not _Tp.
|
||||||
|
|
||||||
2004-06-25 Paolo Carlini <pcarlini@suse.de>
|
2004-06-25 Paolo Carlini <pcarlini@suse.de>
|
||||||
|
|
||||||
* testsuite/25_algorithms/fill/1.cc: Tweak instantiations.
|
* testsuite/25_algorithms/fill/1.cc: Tweak instantiations.
|
||||||
|
@ -546,7 +546,8 @@ namespace std
|
|||||||
_ForwardIterator>)
|
_ForwardIterator>)
|
||||||
__glibcxx_requires_valid_range(__first, __last);
|
__glibcxx_requires_valid_range(__first, __last);
|
||||||
|
|
||||||
typedef typename __type_traits<_Tp>::has_trivial_copy_constructor
|
typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType;
|
||||||
|
typedef typename __type_traits<_ValueType>::has_trivial_copy_constructor
|
||||||
_Trivial;
|
_Trivial;
|
||||||
std::__fill<_Trivial>::fill(__first, __last, __value);
|
std::__fill<_Trivial>::fill(__first, __last, __value);
|
||||||
}
|
}
|
||||||
@ -621,7 +622,8 @@ namespace std
|
|||||||
// concept requirements
|
// concept requirements
|
||||||
__glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator, _Tp>)
|
__glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator, _Tp>)
|
||||||
|
|
||||||
typedef typename __type_traits<_Tp>::has_trivial_copy_constructor
|
typedef typename iterator_traits<_OutputIterator>::value_type _ValueType;
|
||||||
|
typedef typename __type_traits<_ValueType>::has_trivial_copy_constructor
|
||||||
_Trivial;
|
_Trivial;
|
||||||
return std::__fill_n<_Trivial>::fill_n(__first, __n, __value);
|
return std::__fill_n<_Trivial>::fill_n(__first, __n, __value);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user