-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
compare_pointees.hpp should permit a predicate #72
Comments
For that matter, I should be able compare pointees of different type, provided
|
I thought more about this. I think(?) this is the basis function we'd really want:
Compared with the existing
It's a basis in that the existing
and
I keep coming back to this because I have an old function that has a wall of |
Suppose I have
and I want to test equality (or less-than-ness) of the
float
part, still treating them as optional. That is, thinking of them as optionalfloat
s. Ifequal_pointees
had a predicate argument, I could doThe particular case I'd use this is where I've got a big struct representing the state of a view. For the current frame, I have a pointer to the previous one and a pointer to the current one and I want to decide if I have to a certain part of the work of redrawing. That is, either they have different nullness that's different, or if they are both non-null then compare a projection of them that pertains to the thing I care about.
The text was updated successfully, but these errors were encountered: