|
| template<typename Iterator1, typename Iterator2, typename BinaryPredicate, enable_if_t< is_ranges_input_iter_v< Iterator1 > &&is_ranges_input_iter_v< Iterator2 >, int > = 0> |
| MSTL_NODISCARD constexpr bool | equal (Iterator1 first1, Iterator1 last1, Iterator2 first2, BinaryPredicate binary_pred) noexcept(noexcept(++first1) &&noexcept(++first2) &&noexcept(binary_pred(*first1, *first2))) |
| | 比较两个范围是否相等
|
| template<typename Iterator1, typename Iterator2> |
| MSTL_NODISCARD constexpr bool | equal (Iterator1 first1, Iterator1 last1, Iterator2 first2) noexcept(noexcept(_MSTL equal(first1, last1, first2, _MSTL equal_to< iter_value_t< Iterator1 > >()))) |
| | 比较两个范围是否相等
|
| template<typename Iterator, typename T, typename Compare, enable_if_t< is_ranges_fwd_iter_v< Iterator >, int > = 0> |
| constexpr pair< Iterator, Iterator > | equal_range (Iterator first, Iterator last, const T &value, Compare comp) |
| | 查找值的相等范围
|
| template<typename Iterator, typename T> |
| constexpr pair< Iterator, Iterator > | equal_range (Iterator first, Iterator last, const T &value) |
| | 查找值的相等范围
|
| template<typename T, typename Compare> |
| constexpr const T & | max (const T &a, const T &b, Compare comp) noexcept(noexcept(comp(a, b))) |
| | 返回两个值中的较大者
|
| template<typename T> |
| constexpr const T & | max (const T &a, const T &b) noexcept(noexcept(a< b)) |
| | 返回两个值中的较大者
|
| template<typename T, typename Compare> |
| constexpr const T & | min (const T &a, const T &b, Compare comp) noexcept(noexcept(comp(b, a))) |
| | 返回两个值中的较小者
|
| template<typename T> |
| constexpr const T & | min (const T &a, const T &b) noexcept(noexcept(b< a)) |
| | 返回两个值中的较小者
|
| template<typename T, typename Compare> |
| constexpr const T & | median (const T &a, const T &b, const T &c, Compare comp) noexcept(noexcept(comp(a, b))) |
| | 返回三个值的中位数
|
| template<typename T> |
| constexpr const T & | median (const T &a, const T &b, const T &c) noexcept(noexcept(_MSTL median(a, b, c, _MSTL less< T >()))) |
| | 返回三个值的中位数
|
| template<typename Iterator, typename Compare, enable_if_t< is_ranges_input_iter_v< Iterator >, int > = 0> |
| pair< iter_value_t< Iterator >, iter_value_t< Iterator > > constexpr | minmax (Iterator first, Iterator last, Compare comp) |
| | 查找范围中的最小值和最大值
|
| template<typename Iterator> |
| constexpr pair< iter_value_t< Iterator >, iter_value_t< Iterator > > | minmax (Iterator first, Iterator last) |
| | 查找范围中的最小值和最大值
|
| template<typename Iterator, typename Compare, enable_if_t< is_ranges_input_iter_v< Iterator >, int > = 0> |
| constexpr Iterator | max_element (Iterator first, Iterator last, Compare comp) |
| | 查找范围中的最大元素
|
| template<typename Iterator> |
| constexpr Iterator | max_element (Iterator first, Iterator last) |
| | 查找范围中的最大元素
|
| template<typename T> |
| constexpr const T & | max (std::initializer_list< T > list) |
| | 返回初始化列表中的最大值
|
| template<typename Iterator, typename Compare, enable_if_t< is_ranges_input_iter_v< Iterator >, int > = 0> |
| constexpr Iterator | min_element (Iterator first, Iterator last, Compare comp) |
| | 查找范围中的最小元素
|
| template<typename Iterator> |
| constexpr Iterator | min_element (Iterator first, Iterator last) |
| | 查找范围中的最小元素
|
| template<typename T> |
| constexpr const T & | min (std::initializer_list< T > list) |
| | 返回初始化列表中的最小值
|
| template<typename Iterator, typename Compare, enable_if_t< is_ranges_input_iter_v< Iterator >, int > = 0> |
| constexpr pair< Iterator, Iterator > | minmax_element (Iterator first, Iterator last, Compare comp) |
| | 同时查找范围中的最小和最大元素
|
| template<typename Iterator> |
| constexpr pair< Iterator, Iterator > | minmax_element (Iterator first, Iterator last) |
| | 同时查找范围中的最小和最大元素
|
| template<typename T, typename Compare> |
| constexpr const T & | clamp (const T &value, const T &lower, const T &upper, Compare comp) noexcept(noexcept(comp(value, lower))) |
| | 将值限制在指定范围内
|
| template<typename T> |
| constexpr const T & | clamp (const T &value, const T &lower, const T &upper) noexcept(noexcept(_MSTL clamp(value, lower, upper, _MSTL less< T >()))) |
| | 将值限制在指定范围内
|
| template<typename Iterator1, typename Iterator2, typename Compare, enable_if_t< is_ranges_input_iter_v< Iterator1 > &&is_ranges_input_iter_v< Iterator2 >, int > = 0> |
| MSTL_NODISCARD constexpr bool | lexicographical_compare (Iterator1 first1, Iterator1 last1, Iterator2 first2, Iterator2 last2, Compare comp) noexcept(noexcept(++first1) &&noexcept(++first2) &&noexcept(comp(*first1, *first2)) &&noexcept(first1==last1 &&first2 !=last2)) |
| | 字典序比较两个范围
|
| template<typename Iterator1, typename Iterator2, enable_if_t< is_ranges_input_iter_v< Iterator1 > &&is_ranges_input_iter_v< Iterator2 >, int > = 0> |
| MSTL_NODISCARD constexpr bool | lexicographical_compare (Iterator1 first1, Iterator1 last1, Iterator2 first2, Iterator2 last2) noexcept(noexcept(_INNER __lexicographical_compare_aux(first1, last1, first2, last2))) |
| | 字典序比较两个范围
|
| template<typename Iterator1, typename Iterator2, typename Compare, enable_if_t< is_ranges_input_iter_v< Iterator1 > &&is_ranges_input_iter_v< Iterator2 >, int > = 0> |
| pair< Iterator1, Iterator2 > constexpr | mismatch (Iterator1 first1, Iterator1 last1, Iterator2 first2, Compare comp) |
| | 查找两个范围中首个不匹配的元素
|
| template<typename Iterator1, typename Iterator2> |
| constexpr pair< Iterator1, Iterator2 > | mismatch (Iterator1 first1, Iterator1 last1, Iterator2 first2) |
| | 查找两个范围中首个不匹配的元素
|