2002-05-01 Paolo Carlini <pcarlini@unitus.it>
PR libstdc++/6513
* include/bits/stl_uninitialized.h
(uninitialized_copy(_InputIter, _InputIter, _ForwardIter)):
Fix typo in 2001-07-17 commit: typedef _ValueType to
iterator_traits<_ForwardIter> not <_InputIter>.
* testsuite/23_containers/vector_ctor.cc: Add test04.
From-SVN: r52985
+2002-05-01 Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/6513
+ * include/bits/stl_uninitialized.h
+ (uninitialized_copy(_InputIter, _InputIter, _ForwardIter)):
+ Fix typo in 2001-07-17 commit: typedef _ValueType to
+ iterator_traits<_ForwardIter> not <_InputIter>.
+ * testsuite/23_containers/vector_ctor.cc: Add test04.
+
2002-04-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
PR libstdc++/6501
inline _ForwardIter
uninitialized_copy(_InputIter __first, _InputIter __last, _ForwardIter __result)
{
- typedef typename iterator_traits<_InputIter>::value_type _ValueType;
+ typedef typename iterator_traits<_ForwardIter>::value_type _ValueType;
typedef typename __type_traits<_ValueType>::is_POD_type _Is_POD;
return __uninitialized_copy_aux(__first, __last, __result, _Is_POD());
}
// 23.2.4.1 vector constructors, copy, and assignment
#include <vector>
+#include <string>
#include <testsuite_hooks.h>
template<typename T>
#endif
}
+// libstdc++/6513
+void test04()
+{
+ bool test = true;
+ const char* c_strings[5] = { "1", "2", "3", "4", "5" };
+ std::vector<std::string> strings(c_strings, c_strings + 5);
+
+#ifdef DEBUG_ASSERT
+ assert(test);
+#endif
+}
+
int main()
{
test01();
test02();
test03();
+ test04();
return 0;
}