This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: parallel equal not parallel
- From: Paolo Carlini <paolo dot carlini at oracle dot com>
- To: François Dumont <francois dot cppdevs at free dot fr>
- Cc: libstdc++ at gcc dot gnu dot org, Johannes Singler <singler at kit dot edu>
- Date: Thu, 04 Nov 2010 22:53:03 +0100
- Subject: Re: parallel equal not parallel
- References: <4CD31C38.7090703@free.fr>
On 11/04/2010 09:48 PM, François Dumont wrote:
> So it uses the normal mismatch algo, IMO it should be:
>
> template<typename _IIter1, typename _IIter2>
> inline bool
> equal(_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2)
> {
> return mismatch(__begin1, __end1, __begin2).first == __end1;
> }
>
> template<typename _IIter1, typename _IIter2, typename _Predicate>
> inline bool
> equal(_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2,
> _Predicate __pred)
> {
> return mismatch(__begin1, __end1, __begin2, __pred).first ==
> __end1;
> }
>
> Agree ?
Johannes?
Paolo.