The shared pointers are ok. What I meant is the stuff you have in namespace tk -- it's at the bottom of the .h file, so it's not used by anything in the class you declare above. It should be easy to move it to the top of the .cc file.