std::sortable - cppreference.com

std::sortable

来自cppreference.com
 
 
迭代器库
迭代器概念
迭代器原语
算法概念与工具
间接可调用概念
常用算法要求
(C++20)
(C++20)
(C++20)
工具
(C++20)
迭代器适配器
范围访问
(C++11)(C++14)
(C++14)(C++14)  
(C++11)(C++14)
(C++14)(C++14)  
(C++17)(C++20)
(C++17)
(C++17)
 
在标头 <iterator> 定义
template< class I, class Comp = ranges::less, class Proj = std::identity >
concept sortable =
    std::permutable<I> &&
    std::indirect_strict_weak_order<Comp, std::projected<I, Proj>>;
(C++20 起)

sortable 概念指定对于“按照 Comp 将范围重排为有序范围的算法”的要求。

语义要求

std::sortable<I, R, P> 仅若其所蕴含的所有概念均被实现才得以实现。

参阅