This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
[v3,trunk] disable a concept check for std::transform
- To: gcc-patches at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org
- Subject: [v3,trunk] disable a concept check for std::transform
- From: Phil Edwards <pedwards at disaster dot jaj dot com>
- Date: Tue, 17 Apr 2001 19:31:29 -0400
Thanks to some prompting by Peter Schmid, one of the tests being done in the
(old and new) checks was discovered to be too strict. I fear the correct
method is going to require some hefty cleverness, and as such we're not
going to do it until it's clever *and clean and sensible*.
Tested and applied to trunk.
Phil
(who spent the last two days repairing cleverness in another project)
2001-04-17 Phil Edwards <pme@sources.redhat.com>
* include/bits/stl_algo.h (std::transform): Disable the check
on _OutputIter for now.
Index: include/bits/stl_algo.h
===================================================================
RCS file: /home/pme/Repositories/GCC/gcc/libstdc++-v3/include/bits/stl_algo.h,v
retrieving revision 1.4
diff -u -3 -p -r1.4 stl_algo.h
--- include/bits/stl_algo.h 2001/04/13 09:03:18 1.4
+++ include/bits/stl_algo.h 2001/04/17 22:54:57
@@ -533,8 +533,11 @@ _OutputIter transform(_InputIter __first
{
// concept requirements
__glibcpp_function_requires(_InputIteratorConcept<_InputIter>);
+/* XXX
__glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
+ // should be "the type returned by _UnaryOperation"
typename iterator_traits<_InputIter>::value_type>);
+*/
for ( ; __first != __last; ++__first, ++__result)
*__result = __unary_op(*__first);
@@ -550,9 +553,11 @@ _OutputIter transform(_InputIter1 __firs
// concept requirements
__glibcpp_function_requires(_InputIteratorConcept<_InputIter1>);
__glibcpp_function_requires(_InputIteratorConcept<_InputIter2>);
+/* XXX
__glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
- // XXX really should be "the type returned by _BinaryOperation"
+ // should be "the type returned by _BinaryOperation"
typename iterator_traits<_InputIter1>::value_type>);
+*/
for ( ; __first1 != __last1; ++__first1, ++__first2, ++__result)
*__result = __binary_op(*__first1, *__first2);