Update function objects section to the new format#648
Update function objects section to the new format#648Pennycook wants to merge 5 commits intoKhronosGroup:mainfrom
Conversation
Also fixes a bug in the return type of logical_and and logical_or.
|
In the WG meeting today we decided that we should define the return types of the |
Note that the decltype() only describes the return type of the operator, so it doesn't actually constrain the implementation of the operator.
- Add Precondition that T is Cpp17LessThanComparable. - Use the same wording for the Returns paragraph.
|
This should be read to review, now. Note that the Cpp17LessThanComparable requirement is a precondition and not a constraint. This was surprising to me, but I wanted to follow the ISO C++ definition: https://eel.is/c++draft/alg.min.max |
|
Not in the PR, but if you don't mind to a sneaky update (don't tell our editor :p ) : This guy (4) is not aligned. |
|
For my own benefit, this is the Intel tracker to add CTS tests: CMPLRLLVM-65338 |
fix to return boolean value type of `logical_and`/`logical_or` according to KhronosGroup/SYCL-Docs#648 CTS changes will be done in a separate PR --------- Co-authored-by: Steffen Larsen <steffen.larsen@intel.com>
|
The change has been merged into DPC++: intel/llvm#17239. |
|
Still waiting CTS I think. |
Also fixes a bug in the return type of logical_and and logical_or. Closes #646.
The return types of the
voidspecializations ofmaximumandminimummay require further discussion. Prior to this change, the specification didn't say exactly which operator(s) would be used to determine ordering, and so I tried to honor that in this new wording.When we introduced the prior wording there was some discussion of trying to align with
std::minandstd::max(see #285 (comment)). It we want to describe the behavior in terms of equivalent statements, I think the fix is to say:minimumandmaximumrequireTto beLessThanComparable.minimumreturns(b < a) ? b : a.maximumreturns(a < b) ? b : a.