Trouble using std::equal_range

I am having trouble getting std::equal_range to perform as I wish, and I
can't find my error.

Here's the situation:
I have a vector of pointers to filesystem path objects (a file list,
basically). This vector is partitioned each time the file list was
rebuilt into paths which are directories and paths which are not. The
directories comes first.
Here is the code so far:

Okay, this was only the background story. Here comes the critical part:
At some point of program execution I now want to find a specific path in
this vector. Until recently I used std::find_if( <path equals some
pathname> ).
This however is kind of a waste of time, since the vector is sorted, so
I can as well use a binary search algorithm and may probably get away
consuming less time. I decided to pick std::equal_range to do that:

Share This Page

Welcome to The Coding Forums!

Welcome to the Coding Forums, the place to chat about anything related to programming and coding languages.

Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free. You'll be able to ask questions about coding or chat with the community and help others.
Sign up now!