aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Carlini <pcarlini@suse.de>2004-06-25 14:17:58 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2004-06-25 14:17:58 +0000
commit07e938fc863ee4cec163cb9290476274242ca68d (patch)
tree4ac33c7676268dc40b45ea1e1a303e64f8656d78
parent4adf3e34b2ece6f4caac9d42dd4f636b8fc342b3 (diff)
downloadgcc-07e938fc863ee4cec163cb9290476274242ca68d.zip
gcc-07e938fc863ee4cec163cb9290476274242ca68d.tar.gz
gcc-07e938fc863ee4cec163cb9290476274242ca68d.tar.bz2
stl_algobase.h (fill, fill_n): Revert last change...
2004-06-25 Paolo Carlini <pcarlini@suse.de> * include/bits/stl_algobase.h (fill, fill_n): Revert last change: actually we need to copy construct an object of type _Tp, not of type iterator_traits<>::value_type, therefore the code is ok. From-SVN: r83652
-rw-r--r--libstdc++-v3/ChangeLog7
-rw-r--r--libstdc++-v3/include/bits/stl_algobase.h6
2 files changed, 9 insertions, 4 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 3e76dd7..63df31b 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,5 +1,12 @@
2004-06-25 Paolo Carlini <pcarlini@suse.de>
+ * include/bits/stl_algobase.h (fill, fill_n): Revert last
+ change: actually we need to copy construct an object of type
+ _Tp, not of type iterator_traits<>::value_type, therefore the
+ code is ok.
+
+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.
diff --git a/libstdc++-v3/include/bits/stl_algobase.h b/libstdc++-v3/include/bits/stl_algobase.h
index 1259f95..0db0ef7 100644
--- a/libstdc++-v3/include/bits/stl_algobase.h
+++ b/libstdc++-v3/include/bits/stl_algobase.h
@@ -546,8 +546,7 @@ namespace std
_ForwardIterator>)
__glibcxx_requires_valid_range(__first, __last);
- typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType;
- typedef typename __type_traits<_ValueType>::has_trivial_copy_constructor
+ typedef typename __type_traits<_Tp>::has_trivial_copy_constructor
_Trivial;
std::__fill<_Trivial>::fill(__first, __last, __value);
}
@@ -622,8 +621,7 @@ namespace std
// concept requirements
__glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator, _Tp>)
- typedef typename iterator_traits<_OutputIterator>::value_type _ValueType;
- typedef typename __type_traits<_ValueType>::has_trivial_copy_constructor
+ typedef typename __type_traits<_Tp>::has_trivial_copy_constructor
_Trivial;
return std::__fill_n<_Trivial>::fill_n(__first, __n, __value);
}