35#ifndef _BLAZE_UTIL_ALGORITHMS_MINMAX_H_
36#define _BLAZE_UTIL_ALGORITHMS_MINMAX_H_
75template<
typename T1,
typename T2
76 ,
typename R1 = RemoveCVRef_t<T1>
77 ,
typename R2 = RemoveCVRef_t<T2>
78 , EnableIf_t< HasLessThan_v<R2,R1> &&
79 !( IsSigned_v<T1> && IsUnsigned_v<T2> ) &&
80 !( IsUnsigned_v<T1> && IsSigned_v<T2> ) >* =
nullptr >
81constexpr decltype(
auto)
minmax( T1&& a, T2&& b )
89 return std::pair<RT,RT>( std::forward<T2>( b ), std::forward<T1>( a ) );
91 return std::pair<RT,RT>( std::forward<T1>( a ), std::forward<T2>( b ) );
Header file for the CommonType type trait.
Header file for the EnableIf class template.
Header file for the HasLessThan type trait.
Header file for the If class template.
Header file for the IsReference type trait.
Header file for the IsSame and IsStrictlySame type traits.
Header file for the IsSigned type trait.
Header file for the IsUnsigned type trait.
Header file for the RemoveCVRef type trait.
constexpr decltype(auto) minmax(T1 &&a, T2 &&b)
Minmax function for two values/objects.
Definition: Minmax.h:81
typename CommonType< T... >::Type CommonType_t
Auxiliary alias declaration for the CommonType type trait.
Definition: CommonType.h:95
typename If< Condition >::template Type< T1, T2 > If_t
Auxiliary alias template for the If class template.
Definition: If.h:108