Effective C++(tr1)


author:

  • luixiao1223
    title: TR1

the standard C++ library specified by C++98

The Standard Template Library (STL),

  1. including containers (vec- tor, string, map, etc.);
  2. iterators;
  3. algorithms (find, sort, transform, etc.);
  4. function objects (less, greater, etc.);
  5. various container
  6. function object adapters (stack, priorityqueue, memfun, not1,
    etc.).

Iostreams,

  1. including support for user-defined buffering,
  2. internationalized IO,
  3. 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;
}
发布了127 篇原创文章 · 获赞 11 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/luixiao1220/article/details/104493875
今日推荐