Does the standard standardize the implementation detail of object? what i have heard that it is different on some compilers. Even if it is, Is it worth it to get ‘inside the c++ object model’ by lippman and how?
Does the standard standardize the implementation detail of object? what i have heard that
Share
I cannot talk about the book, because I have not read it personally, but it is a common recommendation, so it will not hurt.
As of the standard, it does not mandate a particular object layout, but only places constraints on the behavior of the program, but understanding even one implementation will help you understanding what goes on under the covers. For most things different compilers take similar approaches.
As an example, the dynamic function dispatch mechanism is not defined by the standard, only the behavior, but all compilers implement it based on virtual function tables. The layout of the table (i.e. how the methods are organized there, what extra data might be before/after the table) might differ but the problem of dynamic dispatch is the same and the solutions are similar enough that understanding one will usually help you understand the overall problem.