Spockwang’s BlogWeb应用开发中的几个问题2013年学到了什么C++ Idioms哈佛训戒使用Booch方法进行面向对象分析与设计关于Mysql客户端、连接和服务器字符集CSS Best PracticeMySql HelpGNU Tool ChainC++ GotchasRecent PostsCategories

Variables, Operators and Conversions

Implicit conversions are not applied to non-const reference arguments. See p.146 of [C++].

The distinction between const-reference and non-const reference parameters
is that the former matches constants and const variables while the latter
matches others in overloading resolution. Const-reference can bind
temporary objects but non-const reference can not.

Not like C, consts have internal linkage by default. However, you can use
extern to give it external linkage. See bottom of p.199 of [C++].

There are four kinds of cast in C++: static_cast, dynamic_cast, const_cast, and reinterpret_cast.