From e3d879f3286d633bd777cbd6bb6f39fc1e500a1d Mon Sep 17 00:00:00 2001 From: John Pennycook Date: Fri, 25 Oct 2024 09:29:56 +0100 Subject: [PATCH] Align minimum/maximum description with min/max - Add Precondition that T is Cpp17LessThanComparable. - Use the same wording for the Returns paragraph. --- adoc/chapters/programming_interface.adoc | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/adoc/chapters/programming_interface.adoc b/adoc/chapters/programming_interface.adoc index a4ab32c4..79216b30 100644 --- a/adoc/chapters/programming_interface.adoc +++ b/adoc/chapters/programming_interface.adoc @@ -21491,7 +21491,10 @@ include::{header_dir}/functional/minimum.h[lines=4..-1] T operator()(const T& x, const T& y) const; ---- -_Returns_: The smaller value, or [code]#x# if the arguments are equivalent. +_Preconditions_: [code]#T# meets the Cpp17LessThanComparable requirements. + +_Returns_: The smaller value. +Returns the first value when the arguments are equivalent. ''' @@ -21502,8 +21505,10 @@ template constexpr auto operator()(T&& t, U&& u) const -> decltype(std::forward(u) < std::forward(t) ? std::forward(u) : std::forward(t)); ---- -_Returns_: The smaller value, or [code]#t# if the arguments are equivalent. -The return type is deduced. +_Preconditions_: [code]#T# meets the Cpp17LessThanComparable requirements. + +_Returns_: The smaller value. +Returns the first value when the arguments are equivalent. ==== [code]#maximum# class template @@ -21520,7 +21525,10 @@ include::{header_dir}/functional/maximum.h[lines=4..-1] T operator()(const T& x, const T& y) const; ---- -_Returns_: The larger value, or [code]#x# if the arguments are equivalent. +_Preconditions_: [code]#T# meets the Cpp17LessThanComparable requirements. + +_Returns_: The larger value. +Returns the first value when the arguments are equivalent. ''' @@ -21531,8 +21539,10 @@ template constexpr auto operator()(T&& t, U&& u) const -> decltype(std::forward(t) < std::forward(u) ? std::forward(u) : std::forward(t)); ---- -_Returns_: The larger value, or [code]#t# if the arguments are equivalent. -The return type is deduced. +_Preconditions_: [code]#T# meets the Cpp17LessThanComparable requirements. + +_Returns_: The larger value. +Returns the first value when the arguments are equivalent. [[sec:group-functions]]