Using clang attributes. Added appledoc reference.
Improved exception safety and C++11 support