Namespaces
Variants

nothrow-sentinel-for,nothrow-sized-sentinel-for

来自 zh.cppreference.net
 
 
算法库
受约束算法和范围算法 (C++20)
受约束算法,例如ranges::copy、ranges::sort……
排序和相关操作
划分操作
(C++11)    

排序操作
二分查找操作
(在已划分范围上)
集合操作(在已排序范围上)
合并操作(在已排序范围上)
堆操作
最小/最大操作
(C++11)
(C++17)
字典序比较操作
排列操作


 
 
template< class S, class I >
concept /*nothrow-sentinel-for*/ = std::sentinel_for<S, I>;
(1) (仅用于阐述*)
template< class I >
concept /*nothrow-sized-sentinel-for*/ =
    /*nothrow-sentinel-for*/<S, I> &&
    std::sized_sentinel_for<S, I>;
(2) (自 C++26 起)
(仅用于阐述*)

这些仅用于阐述的概念指定,对于专用<内存>算法在迭代器和哨位之间的操作,不会抛出异常。

语义要求

1) 类型S和I建模nothrow-sentinel-for仅当对于类型I和S的有效值,复制构造、移动构造、复制赋值、移动赋值或比较不会抛出异常时成立。
2) 类型S和I建模nothrow-sized-sentinel-for仅当对于类型-和I的有效值,S运算符不会抛出异常时成立。

注解

这些概念允许某些sentinel_for和sized_sentinel_for操作抛出异常。

参阅

指定一个类型是某个input_or_output_iterator类型的哨位
(概念)
指定-运算符可以应用于迭代器和哨位,以在常数时间内计算它们的差
(概念)