This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [v3,trunk] disable a concept check for std::transform
- To: Gabriel Dos Reis <Gabriel dot Dos-Reis at cmla dot ens-cachan dot fr>
- Subject: Re: [v3,trunk] disable a concept check for std::transform
- From: Phil Edwards <pedwards at disaster dot jaj dot com>
- Date: Tue, 17 Apr 2001 20:02:41 -0400
- Cc: gcc-patches at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org
- References: <20010417193129.A4272@disaster.jaj.com> <flelurnlht.fsf@sel.cmla.ens-cachan.fr>
On Wed, Apr 18, 2001 at 01:40:30AM +0200, Gabriel Dos Reis wrote:
> Phil Edwards <pedwards@disaster.jaj.com> writes:
>
> | 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.
>
> Please, could remove the corresponding piece of code on branch as well?
Hm, okay... it looks like the same slightly-mistaken semantics are there, too.
Applied to branch. Not tested because checks are already off on the branch.
2001-04-17 Phil Edwards <pme@sources.redhat.com>
* include/bits/stl_algo.h (std::transform): Disable the check
on _OutputIter.
Index: include/bits/stl_algo.h
===================================================================
RCS file: /home/pme/Repositories/GCC/gcc/libstdc++-v3/include/bits/stl_algo.h,v
retrieving revision 1.1
diff -u -3 -p -r1.1 stl_algo.h
--- include/bits/stl_algo.h 2000/10/05 11:27:01 1.1
+++ include/bits/stl_algo.h 2001/04/17 23:44:15
@@ -511,7 +511,7 @@ template <class _InputIter, class _Outpu
_OutputIter transform(_InputIter __first, _InputIter __last,
_OutputIter __result, _UnaryOperation __unary_op) {
__STL_REQUIRES(_InputIter, _InputIterator);
- __STL_REQUIRES(_OutputIter, _OutputIterator);
+// __STL_REQUIRES(_OutputIter, _OutputIterator);
for ( ; __first != __last; ++__first, ++__result)
*__result = __unary_op(*__first);
@@ -525,7 +525,7 @@ _OutputIter transform(_InputIter1 __firs
_BinaryOperation __binary_op) {
__STL_REQUIRES(_InputIter1, _InputIterator);
__STL_REQUIRES(_InputIter2, _InputIterator);
- __STL_REQUIRES(_OutputIter, _OutputIterator);
+// __STL_REQUIRES(_OutputIter, _OutputIterator);
for ( ; __first1 != __last1; ++__first1, ++__first2, ++__result)
*__result = __binary_op(*__first1, *__first2);
return __result;