File indexing completed on 2026-05-03 08:13:08
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef _LIBCPP___ALGORITHM_MIN_MAX_RESULT_H
0011 #define _LIBCPP___ALGORITHM_MIN_MAX_RESULT_H
0012
0013 #include <__concepts/convertible_to.h>
0014 #include <__config>
0015 #include <__utility/move.h>
0016
0017 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
0018 # pragma GCC system_header
0019 #endif
0020
0021 _LIBCPP_PUSH_MACROS
0022 #include <__undef_macros>
0023
0024 _LIBCPP_BEGIN_NAMESPACE_STD
0025
0026 #if _LIBCPP_STD_VER >= 20
0027
0028 namespace ranges {
0029
0030 template <class _T1>
0031 struct min_max_result {
0032 _LIBCPP_NO_UNIQUE_ADDRESS _T1 min;
0033 _LIBCPP_NO_UNIQUE_ADDRESS _T1 max;
0034
0035 template <class _T2>
0036 requires convertible_to<const _T1&, _T2>
0037 _LIBCPP_HIDE_FROM_ABI constexpr operator min_max_result<_T2>() const& {
0038 return {min, max};
0039 }
0040
0041 template <class _T2>
0042 requires convertible_to<_T1, _T2>
0043 _LIBCPP_HIDE_FROM_ABI constexpr operator min_max_result<_T2>() && {
0044 return {std::move(min), std::move(max)};
0045 }
0046 };
0047
0048 }
0049
0050 #endif
0051
0052 _LIBCPP_END_NAMESPACE_STD
0053
0054 _LIBCPP_POP_MACROS
0055
0056 #endif