Namespaces
Variants

nothrow-input-range, nothrow-forward-range, nothrow-bidirectional-range, no-throw-input-range, nothrow-random-access-range, nothrow-sized-random-access-range

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

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


 
 
template< class R >
concept /*nothrow-input-range*/ =
    ranges::range<R> &&
    /*nothrow-input-iterator*/<ranges::iterator_t<R>> &&
    /*nothrow-sentinel-for*/<ranges::sentinel_t<R>, ranges::iterator_t<R>>;
(1) (仅用于描述*)
template< class R >
concept /*nothrow-forward-range*/ =
    /*nothrow-input-range*/<R> &&
    /*nothrow-forward-iterator*/<ranges::iterator_t<R>>;
(2) (仅用于描述*)
template< class R >
concept /*nothrow-bidirectional-range*/ =
    /*nothrow-forward-range*/<R> &&
    /*nothrow-bidirectional-iterator*/<ranges::iterator_t<R>>;
(3) (自 C++26 起)
(仅用于描述*)
template< class R >
concept /*nothrow-random-access-range*/ =
    /*nothrow-bidirectional-range*/<R> &&
    /*nothrow-random-access-iterator*/<ranges::iterator_t<R>>;
(4) (自 C++26 起)
(仅用于描述*)
template< class R >
concept /*nothrow-sized-random-access-range*/ =
    /*nothrow-random-access-range*/<R> && ranges::sized_range<R>;
(5) (自 C++26 起)
(仅用于描述*)

这些仅用于描述的概念指定,在范围上由专用 <内存> 算法所需的操作不会抛出异常。

关于 /*nothrow-input-iterator*/, /*nothrow-forward-iterator*/, /*nothrow-bidirectional-iterator*/ 和 /*nothrow-random-access-iterator*/ 的定义,请参见 此页面.

语义要求

1) 类型 R 满足 nothrow-input-range 仅当对类型为 ranges::begin 和 ranges::end 的对象调用没有抛出异常时。R.
5) 类型 R 满足 nothrow-sized-random-access-range 仅当对类型为 ranges::size 的对象调用没有抛出异常时。R.

注解

这些概念允许某些范围上的操作抛出异常。

参阅

指定一个类型是一个范围,即它提供 begin 迭代器 和 end 哨位
(概念)
指定一个范围在常数时间内知道其大小
(概念)
获取范围的迭代器和哨位类型
(别名模板)