Apr
18
2009

An introduction to C++ Traits(zz)

Think of a trait as a small object whose main purpose is to carry information used by another object or algorithm to determine “policy” or “implementation details”. – Bjarne Stroustrup

0
Apr
18
2009

Traits技术:类型的if-else-then(STL核心技术之一)

简短截说,traits如此重要,是因为此项技术允许系统在编译时根据类型作一些决断,
就好像在运行时根据值来作出决断一样。更进一步,此技术遵循“另增一个间接层”
的谚语,解决了不少软件工程问题,traits使您能根据其产生的背景(context)
来作出抉择。这样最终的代码就变得清晰易读,容易维护。如果你正确运用了traits
技术,你就能在不付出任何性能和安全代价的同时得到这些好处,或者能够契合其他
解决方案上的需求。

0
Apr
08
2009

[原创]关于使用template的一点经验

关于使用template的一点经验

0
Apr
05
2009

转一个长文,一个关于信任的故事(zz)

庸人自扰引发的血案《爱你,所以放了你》

0