Chapter 32. Name Lookup and the Interface Principle—Part 2
Difficulty: 9
What's in a class? That is, what is “part of” a class and its interface?
Hint #1: Clearly nonstatic member functions are tightly coupled to the class, and public nonstatic member functions make up part of the class's interface. What about static member functions? What about free functions?
Hint #2: Take some time to consider the implications of Item 31.
Solution
We'll start off with the deceptively simple question: What functions are “part of” a class, or make up the interface of a class?
The deeper questions are:
How does this answer fit with C-style object-oriented programming? ...
Get Exceptional C++: 47 Engineering Puzzles, Programming Problems, and Solutions now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.