www.digitalmars.com         C & C++   DMDScript  

c++.stlsoft - Patch for a bug in rangelib/algorithms.hpp

reply Yakov Markovitch <yakovm nospam.net> writes:
Please consider the following patch for a bug in r_exists_if implementation for
 sequence_range. There should be std::find_if instead of std::find.

---
Best regards,
Yakov Markovitch
Contour Components
yakovm at contourcomponents.com
Apr 11 2007
parent "Matthew Wilson" <matthew hat.stlsoft.dot.org> writes:
Thanks, Yakov

I've added that, and significantly beefed up the unit-tests for
rangelib/algorithms.

The changes will be out in STLSoft 1.9.1 beta 48, which I should release in
the next day or so.

Cheers

Matthew

"Yakov Markovitch" <yakovm nospam.net> wrote in message
news:evip4b$12j9$1 digitalmars.com...
 Please consider the following patch for a bug in r_exists_if
implementation for
  sequence_range. There should be std::find_if instead of std::find.

 ---
 Best regards,
 Yakov Markovitch
 Contour Components
 yakovm at contourcomponents.com
---------------------------------------------------------------------------- ----
 --- algorithms.bug.hpp 2007-03-12 21:16:54.000000000 +0300
 +++ algorithms.hpp 2007-04-11 17:40:24.781250000 +0400
    -755,7 +755,7   
          >
  inline ss_bool_t r_exists_if_1_impl(R r, P pred, iterable_range_tag
const&)
  {
 -    return std::find(r.begin(), r.end(), pred) != r.end();
 +    return std::find_if(r.begin(), r.end(), pred) != r.end();
  }

  template<   ss_typename_param_k R
Apr 11 2007