Issue 155878
Summary [libc++] Generalize __three_way_comparator for __make_projected
Labels libc++
Assignees
Reporter ldionne
    `__map_value_compare` is basically an instance of the `on` combinator:

```c++
auto on(func, transform) {
  return [](auto ...args) {
    return func(invoke(transform, args)...);
  };
};
```

I think we have something else that is extremely similar to that called `_ProjectedPred` (via `__make_projected`). I don't think we need to do that right now, but as a follow-up I'd like us to generalize this to use the same mechanism. The goal is for predicates created via `__make_projected` to also be picked up by this optimization, since we use `__make_projected` in many algorithms that use comparisons. That should be done in a separate patch though.

_Originally posted by @ldionne in https://github.com/llvm/llvm-project/pull/155245#discussion_r2307843837_
 
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to