|
template<typename _type , typename... _tParams> |
auto | unsequenced (_type &&arg, _tParams &&...) -> decltype(std::forward< decltype(arg)>(arg)) |
| 无序列依赖表达式组求值实现。
|
|
template<class _type > |
_type * | pod_fill (_type *first, _type *last, const _type &value) |
|
template<class _type > |
_type * | pod_copy_n (const _type *first, size_t n, _type *result) |
|
template<class _type > |
_type * | pod_copy (const _type *first, const _type *last, _type *result) |
|
template<class _type > |
_type * | pod_move_n (const _type *first, size_t n, _type *result) |
|
template<class _type > |
_type * | pod_move (const _type *first, const _type *last, _type *result) |
|
template<typename _tForward > |
_tForward | stable_range_unique (_tForward first, _tForward last) |
| 去除迭代器指定的范围中的重复元素,且不改变元素之间的相对顺序。
|
|
template<typename _type , typename _tDifference , typename _tPointer , typename _tReference > |
bool | operator== (const any_forward_iterator< _type, _tDifference, _tPointer, _tReference > &x, const any_forward_iterator< _type, _tDifference, _tPointer, _tReference > &y) |
|
template<typename _type , typename _tDifference , typename _tPointer , typename _tReference > |
bool | operator!= (const any_forward_iterator< _type, _tDifference, _tPointer, _tReference > &x, const any_forward_iterator< _type, _tDifference, _tPointer, _tReference > &y) |
|
template<typename _type , typename _tDifference , typename _tPointer , typename _tReference > |
bool | is_undereferenceable (const any_forward_iterator< _type, _tDifference, _tPointer, _tReference > &i) |
|
template<typename _type , typename _tDifference , typename _tPointer , typename _tReference > |
bool | operator== (const any_bidirectional_iterator< _type, _tDifference, _tPointer, _tReference > &x, const any_bidirectional_iterator< _type, _tDifference, _tPointer, _tReference > &y) |
|
template<typename _type , typename _tDifference , typename _tPointer , typename _tReference > |
bool | operator!= (const any_bidirectional_iterator< _type, _tDifference, _tPointer, _tReference > &x, const any_bidirectional_iterator< _type, _tDifference, _tPointer, _tReference > &y) |
|
template<typename _type , typename _tDifference , typename _tPointer , typename _tReference > |
bool | is_undereferenceable (const any_bidirectional_iterator< _type, _tDifference, _tPointer, _tReference > &i) |
|
template<typename _tDst , typename _tSrc > |
_tDst | union_cast (_tSrc x) ynoexcept |
| 使用匿名联合体进行的类型转换。
|
|
template<typename _tDst , typename... _tSrc> |
std::initializer_list< _tDst > | initializer_cast (_tSrc &&...x) |
| 初值符列表转换。
|
|
template<typename _pDst , class _tSrc > |
_pDst | polymorphic_cast (_tSrc *x) |
| 多态类指针类型转换。
|
|
template<typename _pDst , class _tSrc > |
_pDst | polymorphic_downcast (_tSrc *x) |
| 多态类指针向派生类指针转换。
|
|
template<typename _rDst , class _tSrc > |
_rDst & | polymorphic_downcast (_tSrc &x) |
| 多态类引用向派生类引用转换。
|
|
template<typename _pDst , class _tSrc > |
_pDst | polymorphic_crosscast (_tSrc *x) |
| 多态类指针交叉转换。
|
|
template<typename _rDst , class _tSrc > |
_rDst & | polymorphic_crosscast (_tSrc &x) |
| 多态类引用交叉转换。
|
|
template<typename _tContainer , typename... _tParams> |
void | seq_insert (_tContainer &cont, _tParams &&...args) |
| 顺序插入值至指定容器。
|
|
template<typename _tContainer > |
void | erase_all (_tContainer &c, const typename _tContainer::value_type &val) |
| 删除指定序列容器中和指定值的相等的元素。
|
|
template<typename _tContainer , typename _tIn , typename _tValue > |
void | erase_all (_tContainer &c, _tIn first, _tIn last, const _tValue &value) |
| 删除指定容器中迭代器区间中和指定值的相等的元素。
|
|
template<typename _tRange , typename _fPredicate > |
void | erase_all_if (_tRange &c, _fPredicate pred) |
| 删除指定序列范围(包含序列容器及内建数组等)中满足条件的元素。
|
|
template<typename _tContainer , typename _tIn , typename _fPredicate > |
void | erase_all_if (_tContainer &c, _tIn first, _tIn last, _fPredicate pred) |
| 删除指定容器中迭代器区间中满足条件的元素。
|
|
template<class _tMap > |
std::pair< typename
_tMap::iterator, bool > | search_map (_tMap &m, const typename _tMap::key_type &k) |
| 按指定键值搜索指定映射。
|
|
template<typename _type , typename... _tParams> |
std::array< _type, sizeof...(_tParams)> | make_array (_tParams &&...args) |
| 取指定参数初始化的 std::array 对象。
|
|
bool | fexists (const char *) ynoexcept |
| 判断指定路径的文件是否存在。
|
|
const char * | openmode_conv (std::ios_base::openmode) ynoexcept |
|
std::ios_base::openmode | openmode_conv (const char *) ynoexcept |
|
bool | operator!= (const ifile_iterator &x, const ifile_iterator &y) |
|
bool | is_undereferenceable (const ifile_iterator &i) |
| 判断 ifile_iterator 实例是否确定为不可解引用。
|
|
size_t | strlen_n (const char *) |
| 带空指针检查的字符串长度计算。
|
|
char * | strcpy_n (char *, const char *) |
| 带空指针检查的字符串复制。
|
|
char * | strcpycat (char *, const char *, const char *) |
| 带空指针检查的字符串连接。
|
|
char * | strcatdup (const char *, const char *, void *(*)(size_t)=std::malloc) |
| 带空指针检查的字符串连接复制。
|
|
template<typename _tChar > |
const bool | is_null (_tChar c) |
| 使用 std::char_traits::eq 判断是否为空字符。
|
|
template<typename _tChar > |
size_t | ntctslen (const _tChar *s) |
| 计算简单 NTCTS 长度。zz
|
|
template<typename _tChar > |
std::char_traits< _tChar >
::int_type | ntctscmp (const _tChar *s1, const _tChar *s2) |
| 按字典序比较简单 NTCTS 。
|
|
template<typename _tChar > |
std::char_traits< _tChar >
::int_type | ntctsicmp (const _tChar *s1, const _tChar *s2) |
| 按字典序比较简单 NTCTS (忽略大小写)。
|
|
template<typename _tChar > |
const size_t | const_ntctslen (const _tChar *s) |
| 计算简单 NTCTS 长度。
|
|
template<typename _tChar > |
const size_t | const_ntctscnt (const _tChar *s, _tChar c) |
| 计算简单 NTCTS 中的指定字符数。
|
|
template<typename _tChar > |
const std::char_traits< _tChar >
::int_type | const_ntctscmp (const _tChar *s1, const _tChar *s2) |
| 比较简单 NTCTS 。
|
|
template<typename _tChar > |
const std::char_traits< _tChar >
::int_type | const_ntctscmp (const _tChar *s1, const _tChar *s2, size_t n) |
| 比较限制长度上限的简单 NTCTS 。
|
|
template<typename _tChar > |
const size_t | const_ntctschr (const _tChar *s, _tChar c) |
| 在简单 NTCTS 中顺序查找指定字符。
|
|
template<typename _tChar > |
const size_t | const_ntctschrn (const _tChar *s, _tChar c, size_t n) |
| 在简单 NTCTS 中顺序查找第指定次数出现的指定字符。
|
|
template<typename _tChar > |
const size_t | const_ntctsstr (const _tChar *s1, const _tChar *s2) |
| 在简单 NTCTS 中顺序查找作为子串的指定 NTCTS 。
|
|
template<typename... _tParams> |
size_t | sizeof_params (_tParams &&...) |
| 统计函数参数列表中的参数个数。
|
|
template<typename _fCallable , typename... _tParams> |
void | unseq_apply (_fCallable &&f, _tParams &&...args) |
| 无序调用。
|
|
template<bool _bIsPositive, typename _tScalar > |
_tScalar & | xcrease (_tScalar &_x) |
| 编译期选择自增/自减运算。
|
|
template<bool _bIsPositive, typename _tScalar1 , typename _tScalar2 > |
_tScalar1 & | delta_assign (_tScalar1 &_x, _tScalar2 &_y) |
| 编译期选择加法/减法复合赋值运算。
|
|
template<typename _tIn , typename _fPred > |
_tIn | next_if (_tIn i, _fPred f, typename std::iterator_traits< _tIn >::difference_type n=1) |
| 迭代器指向的值满足条件时取邻接迭代器,否则取原值。
|
|
template<typename _tIn , typename _type > |
_tIn | next_if_eq (_tIn i, const _type &val, typename std::iterator_traits< _tIn >::difference_type n=1) |
|
template<typename _tIterator1 , typename _tIterator2 > |
auto | make_move_iterator_pair (_tIterator1 it1, _tIterator2 it2) -> decltype(std::make_pair(std::make_move_iterator(it1), std::make_move_iterator(it2))) |
| 取转移迭代器对。
|
|
template<typename _tRange > |
auto | make_move_iterator_pair (_tRange &c) -> decltype(ystdex::make_move_iterator_pair(begin(c), end(c))) |
| 取指定序列范围(包含序列容器及内建数组等)的转移迭代器对。
|
|
template<typename _tIterator , typename _fTransformer > |
transformed_iterator< typename
array_ref_decay< _tIterator >
::type, _fTransformer > | make_transform (_tIterator &&i, _fTransformer &&f) |
| 创建转换迭代器。
|
|
template<typename _tIterator > |
auto | operator| (_tIterator &&i, first_tag) -> decltype(make_transform(std::forward< decltype(i)>(i), iterator_transformation::first< typename array_ref_decay< _tIterator >::type >)) |
| 管道匹配操作符。
|
|
template<typename _tIterator > |
auto | operator| (_tIterator &&i, second_tag) -> decltype(make_transform(std::forward< decltype(i)>(i), iterator_transformation::second< typename array_ref_decay< _tIterator >::type >)) |
|
template<typename _tIterator > |
auto | operator| (_tIterator &&i, indirect_tag) -> decltype(make_transform(std::forward< decltype(i)>(i), iterator_transformation::indirect< typename array_ref_decay< _tIterator >::type >)) |
|
template<class _tContainer , typename _type > |
bool | operator== (const subscriptive_iterator< _tContainer, _type > &x, const subscriptive_iterator< _tContainer, _type > &y) |
| 比较成员下标迭代器的相等性。
|
|
template<class _tContainer , typename _type > |
bool | operator!= (const subscriptive_iterator< _tContainer, _type > &x, const subscriptive_iterator< _tContainer, _type > &y) |
| 比较成员下标迭代器的不等性。
|
|
template<typename _tIterator > |
bool | is_undereferenceable (const _tIterator &) |
|
template<typename _type > |
bool | is_undereferenceable (_type *p) |
|
template<typename _type > |
_type * | raw (_type *const &p) ynoexcept |
|
template<typename _type > |
auto | raw (const std::unique_ptr< _type > &p) ynoexcept-> decltype(p.get()) |
|
template<typename _type > |
_type * | raw (const std::shared_ptr< _type > &p) ynoexcept |
|
template<typename _type > |
_type * | raw (const std::weak_ptr< _type > &p) ynoexcept |
|
template<typename _type > |
bool | reset (std::unique_ptr< _type > &p) ynoexcept |
|
template<typename _type > |
bool | reset (std::shared_ptr< _type > &p) ynoexcept |
|
template<typename _type , typename _pSrc > |
std::unique_ptr< _type > | unique_raw (const _pSrc &p) |
|
template<typename _type , typename _pSrc > |
std::unique_ptr< _type > | unique_raw (_pSrc &&p) |
|
template<typename _type > |
std::unique_ptr< _type > | unique_raw (_type *p) |
|
template<typename _type > |
std::unique_ptr< _type > | unique_raw (nullptr_t) ynoexcept |
|
template<typename _type , typename _pSrc > |
std::shared_ptr< _type > | share_raw (const _pSrc &p) |
|
template<typename _type , typename _pSrc > |
std::shared_ptr< _type > | share_raw (_pSrc &&p) |
|
template<typename _type > |
std::shared_ptr< _type > | share_raw (_type *p) |
|
template<typename _type > |
std::shared_ptr< _type > | share_raw (nullptr_t) ynoexcept |
|
template<typename _type , typename... _tParams> |
std::unique_ptr< _type > | make_unique (_tParams &&...args) |
| 使用 new 和指定参数构造指定类型的 std::unique_ptr 实例。
|
|
template<typename _type , typename... _tParams> |
std::shared_ptr< _type > | make_shared (_tParams &&...args) |
| 使用 new 和指定参数构造指定类型的 std::shared_ptr 实例。
|
|
template<typename _tDst , typename _tSrc > |
_tDst | exp2u (_tSrc n) ynoexcept |
| 取无符号整数的以 2 为底的无符号整数次幂,结果转换为指定目标类型。
|
|
template<class _tString > |
_tString & | ltrim (_tString &&str, typename string_traits< _tString >::const_pointer t=&to_array< typename string_traits< _tString >::value_type >("\n\r\t\v ")[0]) |
| 删除字符串中指定的连续前缀字符。
|
|
template<class _tString > |
_tString & | rtrim (_tString &&str, typename string_traits< _tString >::const_pointer t=&to_array< typename string_traits< _tString >::value_type >("\n\r\t\v ")[0]) |
| 删除字符串中指定的连续后缀字符。
|
|
template<class _tString > |
_tString & | trim (_tString &&str, typename string_traits< _tString >::const_pointer t=&to_array< typename string_traits< _tString >::value_type >("\n\r\t\v ")[0]) |
| 删除字符串中指定的连续前缀与后缀字符。
|
|
template<typename _fPred , typename _fInsert , typename _tIn > |
_tIn | split (_tIn b, _tIn e, _fPred is_delim, _fInsert insert) |
| 以指定字符分割字符序列。
|
|
template<typename _fPred , typename _fInsert , typename _tRange > |
void | split (_tRange &&c, _fPred is_delim, _fInsert insert) |
| 以指定字符分割范围指定的字符串。
|
|
template<typename _tChar > |
std::basic_string< _tChar > | sfmt (const _tChar *fmt,...) |
| 以 C 标准输出格式的输出 std::basic_string 实例的对象。
|
|
template std::string | sfmt< char > (const char *,...) |
| 显式实例化:以 C 标准输出格式的输出 std::string 对象。
|
|
template<typename _type > |
decay< _type >::type | decay_copy (_type &&arg) |
| 退化复制。
|
|
template<typename _type > |
qualified_decay< _type >::type | decay_forward (_type &&arg) |
| 退化传递。
|
|
template<typename _fCallable , typename... _tParams> |
void | call_once (bool &b, _fCallable &&f, _tParams &&...args) |
| 按标识调用函数,保证调用一次。
|
|
template<typename _type , typename , typename... > |
_type & | parameterize_static_object () |
| 类型参数化静态对象。
|
|
template<typename _type , size_t... > |
_type & | parameterize_static_object () |
| 非类型参数化静态对象。
|
|
template<typename _tKey , typename... _tKeys, typename _fInit , typename... _tParams> |
auto | get_init (_fInit &&f, _tParams &&...args) -> decltype(f(std::forward< decltype(args)>(args)...))& |
| 取类型标识和初始化调用指定的对象。
|
|
template<size_t... _vKeys, typename _fInit , typename... _tParams> |
auto | get_init (_fInit &&f, _tParams &&...args) -> decltype(f(std::forward< decltype(args)>(args)...))& |
| 取非类型标识和初始化调用指定的对象。
|
|
char * | strcatdup (const char *s1, const char *s2, void *(*fun)(size_t)) |
|
|
template<typename _type > |
bool | operator== (nullptr_t lhs, const _type &rhs) |
|
template<typename _type > |
bool | operator== (const _type &lhs, nullptr_t rhs) |
|
template<typename _type > |
bool | operator!= (nullptr_t lhs, const _type &rhs) |
|
template<typename _type > |
bool | operator!= (const _type &lhs, nullptr_t rhs) |
|
|
template<typename _tPointer > |
_tPointer | any_cast (any *p) ynoexcept |
| 动态泛型转换。
|
|
template<typename _tPointer > |
_tPointer | any_cast (const any *p) ynoexcept |
|
|
template<typename _tValue > |
_tValue | any_cast (any &x) |
|
template<typename _tValue > |
_tValue | any_cast (const any &x) |
|
|
template<typename _type > |
_type * | unsafe_any_cast (any *p) |
| 非安全动态泛型转换。
|
|
template<typename _type > |
const _type * | unsafe_any_cast (const any *p) |
|
|
template<typename _tDst , typename _tSrc > |
_tDst | general_cast (_tSrc *x) |
| 一般类型转换。
|
|
template<typename _tDst , typename _tSrc > |
_tDst | general_cast (_tSrc &x) |
|
template<typename _tDst , typename _tSrc > |
const _tDst | general_cast (const _tSrc &x) |
|
|
template<class _tContainer , typename... _tParams> |
void | assign (_tContainer &con, _tParams &&...args) |
| 插入参数指定的元素到容器。
|
|
template<class _tContainer , typename _type , size_t _vN> |
void | assign (_tContainer &con, const _type(&arr)[_vN]) |
|
|
template<class _tContainer , typename _tKey > |
auto | at (_tContainer &con, const _tKey &k) -> decltype(con.at(k)) |
| 访问关联容器。
- 异常
-
std::out_of_range | 访问的值不存在。 |
|
|
template<class _tContainer , typename _tKey > |
const _tKey & | at (const _tContainer &con, const _tKey &k) |
|
|
template<typename _type , size_t _vN, typename _tSrc > |
std::array< _type, _vN > | to_array (const _tSrc &src) |
| 取指定参数转换为 std::array 对象。
|
|
template<typename _type , size_t _vN> |
std::array< _type, _vN > | to_array (const std::array< _type, _vN > &src) |
|
template<typename _type , size_t _vN, typename _tSrcElement > |
std::array< _type, _vN > | to_array (const _tSrcElement(&src)[_vN]) |
|
template<typename _type , size_t _vN, typename _tSrcElement > |
std::array< _type, _vN > | to_array (_tSrcElement(&&src)[_vN]) |
|
|
template<typename _fCallable > |
void | seq_apply (_fCallable &&) |
| 顺序递归调用。
|
|
template<typename _fCallable , typename _type , typename... _tParams> |
void | seq_apply (_fCallable &&f, _type &&arg, _tParams &&...args) |
|
|
template<typename _type > |
_type & | unref (_type &&x) ynoexcept |
| 解除引用包装。
|
|
template<typename _type > |
_type & | unref (const std::reference_wrapper< _type > &x) ynoexcept |
|
|
template<typename _tBi , typename _fPred > |
_tBi | prev_if (_tBi i, _fPred f, typename std::iterator_traits< _tBi >::difference_type n=1) |
| 迭代器指向的值满足条件时取反向邻接迭代器,否则取原值。
|
|
template<typename _tBi , typename _type > |
_tBi | prev_if_eq (_tBi i, const _type &val, typename std::iterator_traits< _tBi >::difference_type n=1) |
|
|
template<typename _type > |
bool | operator== (const pointer_iterator< _type > &x, const pointer_iterator< _type > &y) |
|
template<typename _type > |
bool | operator!= (const pointer_iterator< _type > &x, const pointer_iterator< _type > &y) |
|
|
template<typename _type , typename _tIterator , typename _tTraits > |
bool | operator== (const pseudo_iterator< _type, _tIterator, _tTraits > &x, const pseudo_iterator< _type, _tIterator, _tTraits > &y) |
|
template<typename _type , typename _tIterator , typename _tTraits > |
bool | operator!= (const pseudo_iterator< _type, _tIterator, _tTraits > &x, const pseudo_iterator< _type, _tIterator, _tTraits > &y) |
|
|
template<typename _type , typename _fTransformer > |
bool | operator== (const transformed_iterator< _type, _fTransformer > &x, const transformed_iterator< _type, _fTransformer > &y) |
|
template<typename _type , typename _fTransformer > |
bool | operator!= (const transformed_iterator< _type, _fTransformer > &x, const transformed_iterator< _type, _fTransformer > &y) |
|
|
template<typename _tMaster , typename _tSlave > |
bool | operator== (const pair_iterator< _tMaster, _tSlave > &x, const pair_iterator< _tMaster, _tSlave > &y) |
|
template<typename _tMaster , typename _tSlave > |
bool | operator!= (const pair_iterator< _tMaster, _tSlave > &x, const pair_iterator< _tMaster, _tSlave > &y) |
|
|
template<typename _tString > |
_tString | get_mid (const _tString &str, typename _tString::size_type l=1) |
| 取删除前缀和后缀的子字符串。
|
|
template<typename _tString > |
_tString | get_mid (const _tString &str, typename _tString::size_type l, typename _tString::size_type r) |
|
|
std::string | to_string (unsigned char val) |
| 转换为字符串。
|
|
std::string | to_string (unsigned short val) |
|
template<typename _type > |
std::string | to_string (_type val, typename std::enable_if< std::is_enum< _type >::value, int >::type=0) |
|
|
template<typename _type , size_t _vN> |
size_t | arrlen (_type(&)[_vN]) |
| 计算指定数组类型对象的长度。
|
|
template<typename _type , size_t _vN> |
size_t | arrlen (_type(&&)[_vN]) |
|