
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.




近期评论