Topic: Question about `binary_search()


Author: Kresimir.Fresl@public.srce.hr (Kresimir Fresl - Grad.fak.)
Date: 1996/01/04
Raw View
Sorry. In my yesterday's posting:

> I have a question concerning STL function `binary_search()'.
>
> Why is the return value of type `bool', and not (template) `ForwardIterator'
> (function `find', for example, returns `InputIterator'). I can't imagine
> situation where someone would like to know if something is in container,
> but also the location of this something.

last row should be:

``but __not__ also the location of this something.''

---
Kresimir Fresl
Faculty of Civil Engineering
Zagreb, Croatia
email: Kresimir.Fresl@public.srce.hr
---
[ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]