YSTest  PreAlpha_b400_20130424
The YSLib Test Project
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
container.hpp 文件参考

通用容器操作。 更多...

#include "functional.hpp"
#include <array>
#include <algorithm>
container.hpp 的引用(Include)关系图:
此图展示该文件直接或间接的被哪些文件引用了:

浏览源代码.

class  ystdex::container_inserter< _tContainer >
 容器插入函数对象。 更多...
 

命名空间

namespace  ystdex
 

函数

template<typename _tContainer , typename... _tParams>
void ystdex::seq_insert (_tContainer &cont, _tParams &&...args)
 顺序插入值至指定容器。
 
template<typename _tContainer >
void ystdex::erase_all (_tContainer &c, const typename _tContainer::value_type &val)
 删除指定序列容器中和指定值的相等的元素。
 
template<typename _tContainer , typename _tIn , typename _tValue >
void ystdex::erase_all (_tContainer &c, _tIn first, _tIn last, const _tValue &value)
 删除指定容器中迭代器区间中和指定值的相等的元素。
 
template<typename _tRange , typename _fPredicate >
void ystdex::erase_all_if (_tRange &c, _fPredicate pred)
 删除指定序列范围(包含序列容器及内建数组等)中满足条件的元素。
 
template<typename _tContainer , typename _tIn , typename _fPredicate >
void ystdex::erase_all_if (_tContainer &c, _tIn first, _tIn last, _fPredicate pred)
 删除指定容器中迭代器区间中满足条件的元素。
 
template<class _tMap >
std::pair< typename
_tMap::iterator, bool > 
ystdex::search_map (_tMap &m, const typename _tMap::key_type &k)
 按指定键值搜索指定映射。
 
template<typename _type , typename... _tParams>
std::array< _type, sizeof...(_tParams)> ystdex::make_array (_tParams &&...args)
 取指定参数初始化的 std::array 对象。
 
template<class _tContainer , typename... _tParams>
void ystdex::assign (_tContainer &con, _tParams &&...args)
 插入参数指定的元素到容器。
 
template<class _tContainer , typename _type , size_t _vN>
void ystdex::assign (_tContainer &con, const _type(&arr)[_vN])
 
template<class _tContainer , typename _tKey >
auto ystdex::at (_tContainer &con, const _tKey &k) -> decltype(con.at(k))
 访问关联容器。

异常
std::out_of_range访问的值不存在。

 
template<class _tContainer , typename _tKey >
const _tKey & ystdex::at (const _tContainer &con, const _tKey &k)
 
template<typename _type , size_t _vN, typename _tSrc >
std::array< _type, _vN > ystdex::to_array (const _tSrc &src)
 取指定参数转换为 std::array 对象。
 
template<typename _type , size_t _vN>
std::array< _type, _vN > ystdex::to_array (const std::array< _type, _vN > &src)
 
template<typename _type , size_t _vN, typename _tSrcElement >
std::array< _type, _vN > ystdex::to_array (const _tSrcElement(&src)[_vN])
 
template<typename _type , size_t _vN, typename _tSrcElement >
std::array< _type, _vN > ystdex::to_array (_tSrcElement(&&src)[_vN])
 

详细描述

通用容器操作。

版本
r253
作者
FrankHB frank.nosp@m.hb19.nosp@m.89@gm.nosp@m.ail..nosp@m.com
自从
build 338
创建时间:
2012-09-12 01:36:20 +0800
修改时间:
2013-04-19 17:16 +0800
文本编码:
UTF-8
模块名称:
YStandardEx::Containers

在文件 container.hpp 中定义.