diff options
Diffstat (limited to 'contrib/llvm-project/libcxx/include/__algorithm/min.h')
-rw-r--r-- | contrib/llvm-project/libcxx/include/__algorithm/min.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/llvm-project/libcxx/include/__algorithm/min.h b/contrib/llvm-project/libcxx/include/__algorithm/min.h index 9fea7f70a2bb..5cacb2f28e7e 100644 --- a/contrib/llvm-project/libcxx/include/__algorithm/min.h +++ b/contrib/llvm-project/libcxx/include/__algorithm/min.h @@ -11,6 +11,7 @@ #include <__config> #include <__algorithm/comp.h> +#include <__algorithm/comp_ref_type.h> #include <__algorithm/min_element.h> #include <initializer_list> @@ -49,7 +50,8 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 _Tp min(initializer_list<_Tp> __t, _Compare __comp) { - return *_VSTD::min_element(__t.begin(), __t.end(), __comp); + typedef typename __comp_ref_type<_Compare>::type _Comp_ref; + return *_VSTD::__min_element<_Comp_ref>(__t.begin(), __t.end(), __comp); } template<class _Tp> |