author:
- luixiao1223
title: TR1
the standard C++ library specified by C++98
The Standard Template Library (STL),
- including containers (vec- tor, string, map, etc.);
- iterators;
- algorithms (find, sort, transform, etc.);
- function objects (less, greater, etc.);
- various container
- function object adapters (stack, priorityqueue, memfun, not1,
etc.).
Iostreams,
- including support for user-defined buffering,
- internationalized IO,
- the predefined objects cin, cout, cerr, and clog.
Support for internationalization
including the ability to have multiple active locales. Types like
wchart (usually 16 bits/char) and wstring (strings of wcharts)
facilitate working with Unicode.
Support for numeric processing
including templates for complex numbers (complex) and arrays of pure
values (valarray).
An exception hierarchy
including the base class exception, its derived classes logicerror and
runtimeerror, and various classes that inherit from those.
C89’s standard library.
Everything in the 1989 C standard library is also in C++.
tr1 {#tr1-1}
std::tr1::(name)
智能指针
tr1::shared_ptr and tr1::weak_ptr
function
它是一个template
void registerCallback(std::tr1::function<std::string (int)> func);
bind
hash tables
tr1::unordered_set, tr1::unordered_multiset, tr1::unordered_map, and tr1::unordered_multimap
正则表达式
tuples
array
大小固定,并不是用动态内存分配
mem_fn
reference_wrapper
随机数工具
数学特殊函数
C99兼容扩充
第二组TR1
Type Traits
result_of
如果要使用boost的版本
namespace std {
namespace tr1 = ::boost;
}