Skip to Content
Effective C++, Third Edition
book

Effective C++, Third Edition

by Scott Meyers
May 2005
Intermediate to advanced
320 pages
10h 24m
English
Addison-Wesley Professional
Content preview from Effective C++, Third Edition

5. Implementations

For the most part, coming up with appropriate definitions for your classes (and class templates) and appropriate declarations for your functions (and function templates) is the lion's share of the battle. Once you've got those right, the corresponding implementations are largely straightforward. Still, there are things to watch out for. Defining variables too soon can cause a drag on performance. Overuse of casts can lead to code that's slow, hard to maintain, and infected with subtle bugs. Returning handles to an object's internals can defeat encapsulation and leave clients with dangling handles. Failure to consider the impact of exceptions can lead to leaked resources and corrupted data structures. Overzealous inlining can ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

The C++ Programming Language, 4th Edition

The C++ Programming Language, 4th Edition

Bjarne Stroustrup

Publisher Resources

ISBN: 0321334876Purchase book