ref2const object — everywhere

C++ uses the r2c idiom in many strategic areas — note-worthy

* typeid operator returns a ref to a constant type_info object
* catch(……) often uses a r2c exception object, _BUT_ http://www.parashift.com/c++-faq-lite/exceptions.html#faq-17.15 shows a non-const usage
* op<<
* cvctor
* operator-overload-converters
* op=
* copy ctor — if u drop the “&” you get infinite recursion and stack overflow

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s