Effective STL 学习笔记 Item 21:Comparison Function 相关 Table of Contents 1. Always have comparison functions return false for equal values 2. Strict Weak Ordering 1 Always have c... Read More
posted @ 2013-11-04 18:21 英超 Views(401) Comments(0) Diggs(0) Edit
Effective STL 学习笔记:19 ~ 20 Table of Contents 1. Item 19: 相等 (Equality) 与等价 (Equivalence) 2. Item 20: Specify Comparison Type for Associative containers of pointers 1 Item 19... Read More
posted @ 2013-11-04 13:55 英超 Views(408) Comments(0) Diggs(0) Edit
vector 看起来像是一个存放布尔变量的容器,但是其实本身其实并不是一个容器,它里面存放的对象也不是布尔变量,这一点在 GCC 源码中 vector 的注释中写的很清楚:/** * @brief A specialization of vector for booleans which offers fixed time * access to individual elements in any order. * * Note that vector does not actually meet the requirements for being * a container. ... Read More
posted @ 2013-11-04 11:14 英超 Views(305) Comments(0) Diggs(0) Edit