const – zero runtime (or space) cost

http://www.parashift.com/c++-faq-lite/const-correctness.html points out that the “const” access check

“….is done entirely at compile-time: there is no run-time space or speed cost for the const”.

I feel the private/protected and final access modifiers are similarly compile-time only.

Further, I guess template instantiation is also runtime-cost free.

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