Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Nicolás Brailovsky did a great exploration in to the internals of one modern implementation of structured C++ exception handling:

http://monoinfinito.wordpress.com/series/exception-handling-...

He went so far as to reimplement his own handlers, which is totally awesome.

For other important things, like the memory layout of the inheritance graph (generally optimal for single, non-virtual inheritance), virtual table layouts, the structure of member pointers and RTTI, the Itanium C++ ABI (followed by GCC and Clang on open OS's but not MS) is a good place to glean some insight:

http://refspecs.linuxbase.org/cxxabi-1.83.html

For instance, you may be surprised to learn that member pointers aren't even pointers in this implementation, but a pair of offsets (one for the object, one for the vtable) used to find the function to call.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: