I want to find the first item in a sorted vector that has a field less than some value x.
I need to supply a compare function that compares \'x\' with the internal value
I think what you need is std::bind2nd(std::less(), x). But, of course, the operator< must be defined for MyClass.
Edit: oh and I think you will need a constructor for MyClass that accepts only a float so that it can be implicitly converted. However, there might be a better way to do this.