1) default_sentinel_t 是用于表示范围结尾的空类类型。能与知晓其范围边界的迭代器类型(例如 std::counted_iterator )一同使用它。2) default_sentinel 是default_sentinel_t 类型常量。示例运行此代码 #include <iterator> #include <algorithm> #include <list> #include <iostream> int main() { std::list...
1)default_sentinel_tis an empty class type used to denote the end of a range. It can be used together with iterator types that know the bound of their range (e.g.,std::counted_iterator). 2)default_sentinelis a constant of typedefault_sentinel_t. ...
std::default_sentinel_t,constcounted_iterator&y); (2)(since C++20) 1)Returns the negative distance to the end. 2)Returns the positive distance to the end. This function template is not visible to ordinaryunqualifiedorqualified lookup, and can only be found byargument-dependent lookupwhen std...