Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[libc++][spaceship] Fixed
__debug_three_way_comp
's operator()
for…
… `vector<bool>'s `operator<=>` An issue with `operator()` was found during the implementation of https://reviews.llvm.org/D132268. This patch aims to resolve the issues by updating the operator to use perfect forwarding. The original motivation for `three_way_comp_ref_type` is given in: https://reviews.llvm.org/D131395 `three_way_comp_ref_type`'s implementation is inspired by `comp_ref_type`, which has two overloads: ``` template <class _Tp, class _Up> bool operator()(const _Tp& __x, const _Up& __y); template <class _Tp, class _Up> bool operator()(_Tp& __x, _Up& __y); ``` `__debug_three_way_comp` is missing the first overload and also declares the typealias`_three_way_comp_ref_type ` incorrectly. Reviewed By: #libc, philnik Differential Revision: https://reviews.llvm.org/D150188
- Loading branch information